§ 130.13 IGNORANCE OR MISTAKE.
   (A)   A person's ignorance or mistake as to a matter of either fact or law, except as provided in § 130.08 (C), is a defense if it negatives the existence of the mental state which the section 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 and has not been published or otherwise made reasonably available to him or her, and he or she could not have acquired such knowledge by the exercise of due diligence pursuant to facts known to him or her; or
      (2)   He or she acts in reliance upon a section which later is determined to be invalid; or
      (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;
      (4)   He or she acts in reliance upon an official interpretation of the section, regulation, or order defining the offense, made by a public officer or agency legally authorized to interpret such section.
   (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.
   (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 may be convicted of an included offense of which he would be guilty if the fact or law were as he believed it to be.
   (D)   A defense based upon this section is an affirmative defense.
(ILCS Ch. 720, Act 5, § 4-8)