Allowing 'if' expressions to work on queries.