title: How do you check for null or undefined on a variable assigned to a missing anonymous function expression?
body: <p>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.</p>
  
  <pre><code>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!');
  }
  </code></pre>