private function isOptionalObjectType(Type $nullType, Type $objectType) { return 'null' === $nullType->getName() && $objectType instanceof ObjectType; }