title: Comparing parseInt to NaN in Actionscript 3
body: <p>The AS3 documentation states that if you pass in a string to <code>parseInt</code> that is not a number it will return <code>NaN</code>. However, when I try to compare to <code>NaN</code> the compiler gives me the following error:</p>
  
  <pre><code>Warning: 1098: Illogical comparison with NaN. This statement always evaluates to false.
  </code></pre>
  
  <p>The statement is actually true. Comparing to NaN will always return <code>false</code>. How can I compare to NaN to detect if what was parsed was NaN?</p>
  
  <pre><code>if( parseInt("test") == NaN )
  {
     // do something (never gets here)
  }
  </code></pre>