title: How to get value of textbox on page load, if it is null?
body: <ol>
  <li>Want to check first that, Is text box contains nothing on page load ?</li>
  <li><p>Then assign some value to it.</p>
  
  <pre><code>if (document.getElementById("txtBoxID").value == null) {
  document.getElementById("txtBoxID").value = "Some text here";
  }
  </code></pre></li>
  <li><p>But getting error 
  "JavaScript runtime error: Unable to set property 'value' of undefined or null reference"
  How to do this?</p></li>
  </ol>