title: Cannot read property 'nodeValue' of null
body: <p>I have XML:</p>
  
  <pre><code>&lt;street&gt;&lt;/street&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;street&gt;2813 Bla ave&lt;/street&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>if ((xmldoc.getElementsByTagName('street')[i].firstChild.nodeValue != null)) {
                   alert(1);
                   }
                   alert(2);
  </code></pre>
  
  <p>But the script doesn't work - Cannot read property 'nodeValue' of null</p>