title: typescript shorthand null or undefined to number
body: <p>product can be undefined or null additionally price within product can be undefined or null </p>
  
  <p>so</p>
  
  <pre><code>  getClasses(key: number): string {
              let product = this.model.getProduct(key);
              return `pa-1 ${product.price &lt; 50 ? "bg-info" : "bg-warning"}`;
              }
  </code></pre>
  
  <p>results in</p>
  
  <blockquote>
    <p>TS Object is possibly undefined</p>
  </blockquote>
  
  <p>and </p>
  
  <pre><code>  getClasses(key: number): string {
          let product = this.model.getProduct(key);
              return `pa-1 ${product &amp;&amp; product.price ? product.price :0 &lt; 50 ? "bg-info" : "bg-warning"}`;
          }
      }
  </code></pre>
  
  <p>works ok. </p>
  
  <p>I was just wondering if there is a shorthand for <code>product &amp;&amp; product.price ? product.price :0</code>  it just seems fairly verbose.  something like <code>product?.price?||0</code></p>