title: avoid warning when using strictNullChecks in TypeScript
body: <p>When I have a variable like:</p>
  <p><code>let object: {val1: string, val2: string} | null = null&quot;</code></p>
  <p>and then use this somewhere:</p>
  <pre><code>function method() {
  
    if (object === null { return null }
    
    return object.val1 // warning as object can be null
  
  }
  </code></pre>
  <p>Are there any ways that I can hide this warning here except writing <code>object?.val1</code>?</p>
  <p>Something like Swift's <code>if let</code>, <code>guard let</code> statement would be good</p>
  <p>Thank you !</p>