title: How can I compare a non-existing JavaScript object to undefined without getting a Reference Error?
body: <p>I want to boolean to come out of this expression</p>
  
  <pre><code>(task === undefined);
  </code></pre>
  
  <p>where <code>task</code> is arbitrary and doesn’t appear in the code at all.</p>
  
  <p>However, when I run this in rhino, I get a reference Error. I WANT TRUE</p>
  
  <p>Why don’t I get true?</p>
  
  <p>I want to check if a particular variable has been defined. How do I do it then if this doesn't work?</p>