Notwithstanding any provision of this chapter to the contrary, a person shall not be guilty of an offense under this chapter for producing or possessing the plant cannabis, if all of the following apply:
 1. The person holds a valid hemp license issued by the department of agriculture and land stewardship as provided in chapter 204.
 2. The plant is or was produced on the licensee’s crop site as provided in chapter 204.
 3. The offense arises out of a test of a sample of plants that are part of a crop produced on the licensee’s crop site and the test indicates that the sample does not qualify as hemp under section 204.8 and it does not exceed a maximum concentration of two percent delta-9 tetrahydrocannabinol on a dry weight basis.
 4. The licensee is participating in or has successfully completed the negligent violation program that applies to the licensee’s crop site described in subsection 3 if such program is established by the department of agriculture and land stewardship pursuant to section 204.15.