diff --git a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php
+++ b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php
@@ -122,7 +122,7 @@ class SimpleObjectHydrator extends AbstractHydrator
             }
 
             // Check if value is null before conversion (because some types convert null to something else)
-            $valueIsNull = $value === null;
+            $valueIsNull = null === $value;
 
             // Convert field to a valid PHP value
             if (isset($cacheKeyInfo['type'])) {
Use yoda condition in the null check