title: Vuejs check for a null or undefined value in a method
body: <p>I don't understand why I can't do </p>
  
  <pre><code>openAndFillModalSoin(soin)
          {
              this.show = true,   
  
              this.vDate = soin.date,
              this.vCategorie = soin.categoriesoin.name,
              //This can be null
              if(soin.rabaisraion){
                  this.vReasonReduction = soin.rabaisraison.id;
              }
  
              this.vPaiement = soin.moyendepaiement.nam,
              this.vRefer = soin.referedBy,
              //This can be null aswell
              this.vGiftCard = soin.boncadeau.id,
              this.vVoucher = soin.bonreduction.id;
  
              this.vID = soin.id;
          },
  </code></pre>
  
  <p>The "if" parts doesn't work, it asks for an expression.</p>
  
  <p><a href="https://i.stack.imgur.com/zwLYI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zwLYI.png" alt="If in method"></a></p>