What is the correct way to check if a JS function exists?

I'm told that typeof works but isn't a very good way to do it.

Also, this doesn't work:
Code:
if( function_name ) {
function_name();
}