Prevents the user from searching empty values.