title: How can I hide <span> when it is empty
body: <p>I am working on a user login form.
  It is on my "home.html" ,</p>
  
  <p>I want to show the username after login(when I get session datas form </p>
  
  <p>"login.html" by "Httpsession")</p>
  
  <p>Otherwise just hide  when it is empty.</p>
  
  <pre><code>&lt;span th:text="${user.name}" id="uname"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>When it is empty, I have an error message like this:</p>
  
  <p>EL1007E: Property or field 'name' cannot be found on null.</p>
  
  <p>Thanks.</p>