The jQuery Core Style Guidelines suggest two different ways to check whether a variable is defined.
typeof variable === "undefined&
Because undefined is not always declared, but jQuery declares undefined in its main function. So they use the safe undefined value internally, but outside, they use the typeof style to be safe.
undefined
typeof