A person shall be exempt from prosecution under this Section if his liability is based solely on evidence he has given in order to comply with the requirements of Section 4-1.7 of "The Illinois Public Aid Code", approved April 11, 1967, as amended.
Fornication is a Class B misdemeanor.
720 ILCS 5/11-40