How do you tell if a function in Javascript is defined?
I want to do something like
function something_cool(text, callback){
alert(text);
if( callback != null ){ callback(); };
}
but that gets me a 'callback is not a function' error when callback is not defined.