title: Twig and variables as numbers
body: <p>I'm getting a number from database (let's say, <code>10</code>) and I want to use it in <code>if/else</code> statement. Please note, that my variable may be equal to 0 or null.</p>
  
  <p>My variable is <code>item.getRate.getRate</code>. I'm showing it in template like this: </p>
  
  <blockquote>
    <p>{{ item.getRate.getRate | default('0') }}</p>
  </blockquote>
  
  <p>I try try to do a <code>if</code> statement by doing </p>
  
  <blockquote>
    <p>{% if item.getRate.getRate == 1 %}something{% endif %}</p>
  </blockquote>
  
  <p>but it doesn't work. </p>
  
  <p>It is runned in a loop, and one of the items has empty <code>getRate</code>. Could this be the problem? If yes - how can I avoid it?</p>