diff --git a/src/pystencils/backend/symbols.py b/src/pystencils/backend/symbols.py
index 065a3c8dc0f56a5387d1b5c550db49b175399435..b54ee1db4e1be8055a6a2ebabbac10f267744602 100644
--- a/src/pystencils/backend/symbols.py
+++ b/src/pystencils/backend/symbols.py
@@ -49,7 +49,7 @@ class PsSymbol:
 
     def __eq__(self, other: object) -> bool:
         return (
-            type(self) == type(other)
+            isinstance(other, PsSymbol)
             and self._name == other._name
             and self._dtype == other._dtype
         )