Fix validation to skip performing a query if the field is blank