title: document.getelementbyId will return null if element is not defined?
body: <p>In my code, I see this:</p>
  
  <pre><code>if (document.getElementById('xx') !=null) {
      //do stuff
  }
  </code></pre>
  
  <p>if <code>xx</code> element is not defined, will this evaluate to true or false? </p>
  
  <p>Should I write:</p>
  
  <pre><code>if (document.getElementById('xx'))
  </code></pre>
  
  <p>to be safe?</p>