1. A person is guilty of unauthorized possession of a firearm in a courthouse if that person in fact possesses a firearm in a courthouse.
2. This section does not apply to:
A. A law enforcement officer, a corrections officer or a corrections supervisor engaged in the performance of the law enforcement officer's, corrections officer's or corrections supervisor's public duty;
B. A person possessing an unloaded firearm for the purpose of offering the firearm as evidence in a civil or criminal proceeding if the presiding judge or justice has granted prior approval in writing to the person and the person possesses a copy of the written approval; or
C. An employee of a courier or security service in the course and scope of employment for the courier or security service, as approved by the judicial marshal.
2-A. It is not a defense to a prosecution under this section that the person holds a valid permit to carry a concealed handgun issued under Title 25, chapter 252.
3. Unauthorized possession of a firearm in a courthouse is a Class D crime.