Its always good practice to make a function exists before you use in Javascript. Especially if you are dealing with callback functions and you are not sure of the input supplied to the chunk of code you are in.

This is the best way to check if a function exists in Javascript:

if (typeof(nameOfTheMethod) === "function") {
   // Do your thing with the function.
}

If you like there is an amazing library called underscore that provides great deal of helpers. One of those helpers is isFuntion() method which does the same thing as above. I suggest you add it to your library along side jQuery since they have many other methods that you will find useful.