advice: existence and type check for function arguments
function gimmeh_funcs(myfunc, callback) {
if (myfunc && typeof myfunc === 'function') {
/* myfunc is safe to use */
}
if (callback && typeof callback === "function") {
/* callback is safe to use */
}
}