title: document.getElementByID - checking whether an element has been found or not
body: <p>Here's a sample code, that opens an internet explorer window, navigates to google, and gets some element on the page by its unique id:</p>
  
  <pre><code>set ie = CreateObject("InternetExplorer.Application")
  
  ie.navigate("www.google.com")
  ie.visible = true
  
  while ie.readystate &lt;&gt; 4
      wscript.sleep 100
  WEnd
  
  set some_object = ie.document.getelementbyid("xjsc")
  
  MsgBox some_object.tagname, 0
  </code></pre>
  
  <p>This sample brings me a <code>DIV</code> popup, which satisfies me completely. </p>
  
  <p>But at the next step I'd like to check whether some id exists in the page, or not. Unfortunately, I can't just be, like, </p>
  
  <pre><code>set some_object = ie.document.getelementbyid("some_non_existant_id")
  if some_object.tagname = "" then
  ...
  </code></pre>
  
  <p>because it gives me the following error:</p>
  
  <pre><code>ie.vbs(12, 1) Microsoft VBScript runtime error: Object required: 'some_object'
  </code></pre>
  
  <p>So, what's the best practice to check whether an element has been found or not?</p>