title: Django filter queryset only if variable is not null
body: <p>I have a queryset it filter by 2 variables</p>
  <pre><code>family = ModelsClass.objects.filter(foo=var1).filter(bar=var2)
  </code></pre>
  <p>If var1 and var2 are not null everything work but var1 and var2 can be Null.
  In this case i need to exclude the Null one.</p>
  <p>For example, if var1 is Null it must filter only by var2 and the other way around.</p>
  <p>Is there a way to insert an if condition inside the filter queryset or something else?</p>
  <p>TY</p>