title: Typescript: Type 'number | null' is not assignable to type 'number'
body: <p>I have the following code:</p>
  
  <pre><code>let statistics = this.video.getStatistics();
  
  let currentLikeCount : number = statistics!.getLikeCount() ? statistics.getLikeCount() : 1;
  </code></pre>
  
  <p>However, I get the following error when compiling with Typescript</p>
  
  <pre><code>error TS2322: Type 'number | null' is not assignable to type 'number'.
  </code></pre>
  
  <p>My conditional checks to see if the like count is null, and, if so, assigns it to a number, but typescript still complains about it possibly being null.</p>
  
  <p>How to I properly assign the like count to a number? </p>