checkedValue will throw an error if value is set (controlled by a flag)