I have some functions which occasionally (not always) will receive a callback and run it. Is checking if the callback is defined/function a good style or is there a better w
A valid function is based on the Function prototype, use:
if (callback instanceof Function)
to be sure the callback is a function