title: Typescript strictNullChecks syntax
body: <p>I'm using the <code>strictNullChecks</code> flag in my Typescript project.</p>
  
  <p>Consider the function below:</p>
  
  <pre><code>function hello(a: string | null) {
    if (a !== null) {
      console.log(a.length); // Here, "a" can only be a string
    }
  }
  </code></pre>
  
  <p>The compiler works perfectly here.</p>
  
  <p>However if I write instead <code>if (typeof a !== "null")</code> or even lodash's <code>if (!_.isNull(a))</code> the compiler won't understand and will complain that <code>a</code> can possibly be <code>null</code>.</p>
  
  <p>Is there any way to have these alternative syntaxes work too?</p>