Fixes fatal error that occurs on some php versions when using `method_exists`