(a) In an action by the park owner for eviction based on nonpayment of rent or for recovery of unpaid rent, the resident may raise:
(1) A defense of material noncompliance with this title if, before the due date of rent, the resident gave to the park owner written notice that based on the noncompliance the resident did not intend to pay rent and specified in detail the provision of noncompliance; or
(2) Any other legal or equitable defense.
(b) If, in an action by the park owner for eviction based on nonpayment of rent, the resident raises a defense other than payment, the resident may petition the circuit court for the appointment of a trustee to receive the rent of the resident, apply the same to correcting the deficiency complained of and make a full accounting thereof to the court. The court shall give the parties a reasonable opportunity to present evidence as to the controversy before a trustee is appointed.