PR-424 [search] Correct check for undefined variable
The code was comparing the result of `typeof` with a variable named `undefined`. As typeof returns a string it should compare to `'undefined'`.
https://github.com/cloudera/hue/pull/424
What we really want is to check if `callback` is a function, so I changed the nature of the `if` condition.