diff --git a/src/resolvers/ClassNameResolver.php b/src/resolvers/ClassNameResolver.php
index <HASH>..<HASH> 100644
--- a/src/resolvers/ClassNameResolver.php
+++ b/src/resolvers/ClassNameResolver.php
@@ -50,7 +50,7 @@ class ClassNameResolver implements DependencyResolverInterface
         }
 
         // Our parameter has a class type hint
-        if (isset($type) && !$type->isBuiltin()) {
+        if ($type !== null && !$type->isBuiltin()) {
             return new ClassDependency($type->getName(), $type->allowsNull());
         }
Update src/resolvers/ClassNameResolver.php