test if callback is a function