title: What is the Twig equivalent of isset() and !empty()?
body: <p>What is the Twig equivalent of the below PHP ternary condition?</p>
  
  <pre><code>&lt;?php echo (isset($myVar) &amp;&amp; !empty($myVar)) ? $myVar : '#button-cart'; ?&gt;
  </code></pre>
  
  <p>I have ingloriously tried this but it doesn't look good and of course, it doesn't work:</p>
  
  <pre><code>{{ myVar is defined and myVar not empty ? myVar : '#button-cart' }}
  </code></pre>