title: Thymeleaf: check if a variable is defined
body: <p>How can I check if a variable <strong>is defined</strong> in <strong>Thymeleaf</strong>?</p>
  
  <p>Something like this in Javascript:</p>
  
  <pre><code>if (typeof variable !== 'undefined') { }
  </code></pre>
  
  <p>or this in PHP:</p>
  
  <pre><code>if (isset($var)) { }
  </code></pre>
  
  <p>Is there an equivalent in Thymeleaf?</p>