(a) This section applies to the appointment, assignment, compensation, promotion, transfer, dismissal, and any other matter that relates to the employment of public school employees in this State.
(b) The State Superintendent, a county board, a county superintendent, or an assistant to any one of these may not make any distinction or discriminate in favor of or against any public school employee of this State because of race, religion, color, ancestry or national origin, sex, age, marital status, sexual orientation, or disability unrelated in nature and extent so as to reasonably preclude the performance of the employment except, as to sex, if the employment of a certain sex is reasonably necessary because of the nature of the employment.