title: An expression of type 'void' cannot be tested for truthiness
body: <p>I don't want to push null, so I'm putting a condition to check, but there's a syntax error that says:</p>
  <blockquote>
  <p>&quot;An expression of type 'void' cannot be tested for truthiness&quot;</p>
  </blockquote>
  <p>How do I do this correctly?</p>
  <pre><code>localStorage.setItem('todoitems', JSON.stringify(this.todoitems)) 
    ? localStorage.setItem('todoitems', JSON.stringify(this.todoitems)) 
    : [];
  </code></pre>