title: Adding condition if in attr of form_widget
body: <p>I'd like to display <strong>checked</strong> if a variable is null so I have make this code</p>
  
  <pre><code>{{ form_widget(form.showPrice, {% if travel is null %}  {'attr': {'checked': 'checked'}} {% endif %} ) }}
  </code></pre>
  
  <p>but I got this error</p>
  
  <pre><code>A hash key must be a quoted string, a number, a name, or an expression enclosed in
  parentheses (unexpected token "operator" of value "%" in AppBundle:Dashboard/Travel:form.html.twig at line 100
  </code></pre>