check that callback is a function