before making the callback, also check whether the function passed can be called or not