Replace ReflectionMethod with is_callable checks.