Prevent sending invalid values for checkboxes