fix query error when there are no "sane" values passed into the filter