added better validation for the bool field.