§ 130.042 IGNORANCE OR MISTAKE.
   (A)   A person’s ignorance or mistake as to a matter of fact or law, except as provided herein, is a defense if it negates the existence of a mental state which the statute prescribes with respect to an element of the offense.
   (B)   A person’s reasonable belief that his or her conduct does not constitute an offense is a defense if:
      (1)   The offense is defined by an administrative regulation or order which is not known to him or her has not been published or otherwise made reasonably available to him or her, and he or she could not have acquired the knowledge by the exercise of due diligence pursuant to facts known to him or her;
      (2)   He or she acts in reliance upon a statute which later determined to be invalid;
      (3)   He or she acts in reliance upon an order or opinion of an Illinois Appellate or Supreme Court or a United States Appellate Court later overruled or reversed; or
      (4)   He or she acts in reliance upon an official interpretation of the statute, regulation or order defining the offense, made by a public officer or agency legally authorized to interpret the statute.
   (C)   Although a person’s ignorance or mistake of fact or law or reasonable belief, described in this section, is a defense to the offense charged, he or she may be convicted of an included offense of which he or she would be guilty if the fact or law were as he or she believed it to be.
   (D)   A defense based upon this section is an affirmative defense.
(ILCS Chapter 720, Act 5, § 4-8) (1981 Code, § 42.04, 4-8)