`if(class_exists('Closure', false) && (property_exists($this, $name)||$this->canGetProperty($name)) && $this->$name instanceof Closure)`

This is better as it avoids calling the getter twice.