title: Check if object exists in JavaScript
body: <p>How do I verify the existence of an object in JavaScript?</p>
  
  <p>The following works:</p>
  
  <pre><code>if (!null)
     alert("GOT HERE");
  </code></pre>
  
  <p>But this throws an Error:</p>
  
  <pre><code>if (!maybeObject)
     alert("GOT HERE");
  </code></pre>
  
  <p><strong>The Error:</strong> </p>
  
  <blockquote>
    <p><code>maybeObject</code> is not defined.</p>
  </blockquote>