Use is_callable instead of instanceof