Fix when passing nil in a where condition.