title: *ngIf equivalent in TypeScript code
body: <p>How is it possible check if the component property is undefined within the TypeScript code, in a method for instance? </p>
  
  <p>In .html component template it is possible to do such check as a conditional on displaying html elements. To avoid the diplay in case they do not exist or not initialized yet.</p>
  
  <pre><code>&lt;div *ngIf="exampleComponentProperty"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Is it possible to do the same check in .ts? How would the expression look then?</p>
  
  <pre><code>if (this.exampleComponentProperty != null) {
  // some code...
  }
  </code></pre>
  
  <p>did not seem to work.</p>