When commenting out the anonymous function expression "a" below, how do you properly check for NULL on "b"? Use case: Lets say "a" is an in-page JS include (library) that is assigned to "b", but the library failed to load and now we have a console error.
var a = function () { return 'Success!'; } // Exclude this line
var b = a();
if (typeof b !== 'undefined' || b !== null) { // These checks do not work.
console.log(b);
} else {
console.log('Failed!');
}