check callback is function before firing