title: Typescript: test for Nan, null and undefined only
body: <p>I like to use the <code>!!</code> in Javascript to ensure that a variable is set and that no error will be thrown. </p>
  
  <p>However today I have a variable with <code>0</code> value that is valid for me. I need to ensure that it is not NaN nor undefined, is there really no <strong>short</strong> way to do it without the boring <code>if (variable !== NaN &amp;&amp; variable !== undefined</code>?</p>
  
  <p>If that may help, I am using angular.</p>
  
  <p>Thx.</p>