title: How to give a null check in both if and else statement
body: <pre><code>if (!away) {
     return self.data.a1;
  }
  else {
     return self.data.a2;
  }
  </code></pre>
  
  <p>I am getting undefined in both if and else statement for self.data </p>