Deal with isnull queries