I'm trying to check if a value is "null" but i can't figure out how. Here is my 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=="null"){
     this.DateToast();
   }
   else if( this.Milestone.Commment==='null'){
    this.CommentToast();
  } 
  else{
...
}
The MilestoneType,date and Comment values are from the HTML file:
<ion-segment name="MilestoneType" [(ngModel)]="Milestone.MilestoneType" [ngModelOptions]="{standalone: true}" >
        <ion-segment-button value="Plant" >Plant</ion-segment-button>
        <ion-segment-button value="Fertilizer" >Fertilizer</ion-segment-button>
        <ion-segment-button value="Other" >Other</ion-segment-button>
      </ion-segment>
    </ion-toolbar>
    <div [ngSwitch]="true" >
      <ion-card *ngSwitchCase="Milestone.MilestoneType=== 'Plant' || Milestone.MilestoneType==='Fertilizer' || Milestone.MilestoneType==='Other'">
          <p>Type: {{Milestone.MilestoneType}}</p>
          <label for="date">Date: </label>
          <input required name="date" [(ngModel)]="Milestone.date"  type="date" clearInput="true">
          <br>
        <div class="form-group">
          <label for="Comment" >Comment:</label>
          <input id="comment" name="Comment" [(ngModel)]="Milestone.Comment" clearInput="true">
      </div>
My goal is to check if a value is null .If so, I need to display a message.
I tryied the following in the If structure:
this.Milestone.date=="null"
this.Milestone.date==="null"
Milestone.date=="null"
Milestone.date==="null"
 
     
    