title: checking if value is "null"
body: <p>I'm trying to check if a value is &quot;null&quot; but i can't figure out how.
  Here is my code:</p>
  <pre class="lang-js prettyprint-override"><code> Milestone: any={};
  constructor(public toastController: ToastController) {
      this.Milestone.MilestoneType='';
      this.Milestone.date='';
      this.Milestone.Comment='';
    }
  onSubmit(){
    var Milestone = JSON.stringify({
      MilestoneType: this.Milestone.MilestoneType, 
      date: this.Milestone.date,
      Comment: this.Milestone.Comment,
      ID: this.current.id});
      
     if( this.Milestone.date==&quot;null&quot;){
       this.DateToast();
     }
     else if( this.Milestone.Commment==='null'){
      this.CommentToast();
    } 
    else{
  ...
  }
  </code></pre>
  <p>The <code>MilestoneType</code>,<code>date</code> and <code>Comment</code> values are from the HTML file:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;ion-segment name=&quot;MilestoneType&quot; [(ngModel)]=&quot;Milestone.MilestoneType&quot; [ngModelOptions]=&quot;{standalone: true}&quot; &gt;
          &lt;ion-segment-button value=&quot;Plant&quot; &gt;Plant&lt;/ion-segment-button&gt;
          &lt;ion-segment-button value=&quot;Fertilizer&quot; &gt;Fertilizer&lt;/ion-segment-button&gt;
          &lt;ion-segment-button value=&quot;Other&quot; &gt;Other&lt;/ion-segment-button&gt;
        &lt;/ion-segment&gt;
      &lt;/ion-toolbar&gt;
      &lt;div [ngSwitch]=&quot;true&quot; &gt;
        &lt;ion-card *ngSwitchCase=&quot;Milestone.MilestoneType=== 'Plant' || Milestone.MilestoneType==='Fertilizer' || Milestone.MilestoneType==='Other'&quot;&gt;
            &lt;p&gt;Type: {{Milestone.MilestoneType}}&lt;/p&gt;
            &lt;label for=&quot;date&quot;&gt;Date: &lt;/label&gt;
            &lt;input required name=&quot;date&quot; [(ngModel)]=&quot;Milestone.date&quot;  type=&quot;date&quot; clearInput=&quot;true&quot;&gt;
            &lt;br&gt;
          &lt;div class=&quot;form-group&quot;&gt;
            &lt;label for=&quot;Comment&quot; &gt;Comment:&lt;/label&gt;
            &lt;input id=&quot;comment&quot; name=&quot;Comment&quot; [(ngModel)]=&quot;Milestone.Comment&quot; clearInput=&quot;true&quot;&gt;
        &lt;/div&gt;
  </code></pre>
  <p>My goal is to check if a value is <code>null</code> .If so, I need to display a message.
  I tryied the following in the <code>If</code> structure:
  <code>this.Milestone.date==&quot;null&quot;</code>
  <code>this.Milestone.date===&quot;null&quot;</code>
  <code>Milestone.date==&quot;null&quot;</code>
  <code>Milestone.date===&quot;null&quot;</code></p>