title: How to handle attribute access errors in Jinja2?
body: <p>I've got this:</p>
  
  <pre><code>template = '{{invoice.customer.address.city}}'
  </code></pre>
  
  <p>And it works fine. But sometimes <code>invoice.customer is Null or invoice.customer.address is Null</code> and then jinja throws <code>jinja2.exceptions.UndefinedError: 'None' has no attribute 'address'</code> because it can't reach that <code>.city</code> part. So how do I tell it to just fail silently if it can't access an attribute?</p>
  
  <p>Thanks!</p>