You can use 'is_callable` instead of this check.

```
php > class Derp {
php { function __invoke() { echo 'called'; }
php { }
php > $d = new Derp();
php > var_dump(is_callable($d));
bool(true)
```