title: Javascript Null Check Seems To Not Work
body: <p>I have a null check in my javascript code that doesn't seem to operating as expected.
  It goes like this:</p>
  
  <pre><code>if (myVariable) {
  // Do things with my variable
  }
  </code></pre>
  
  <p>When I reach the inside of the if statement, Chrome's java console says the value I'm trying to use (myVariable) is null. Perhaps I'm not understanding the if statement properly?
  The specific line throwing the error is</p>
  
  <pre><code>window.document.getElementById("myElement").innerText = myVariable
  </code></pre>
  
  <p>Thanks in advance.</p>