(a) Offense defined.--A person is guilty of a misdemeanor of the second degree if he requires as a condition for employment or continuation of employment that an employee or other individual shall take a polygraph test or any form of a mechanical or electrical lie detector test.
(b) Exception.--The provisions of subsection (a) of this section shall not apply to employees or other individuals in the field of public law enforcement or who dispense or have access to narcotics or dangerous drugs.