title: How do I setup an "if object exists" condition?
body: <p>Is there some way to check if an object exists?  I keep getting an "object required" error.  I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... </p>
  
  <pre><code>    var codeName = document.getElementById('testCode');
      //I have tried
      if(codeName != null)
      if(codeName.length != 0)
      if(typeOf codeName != 'undefined')
      if(!codeName)
      if(codeName.value != null)
  </code></pre>
  
  <p>Is there any way to see if an object exists?</p>