(2) The court shall include in the judgment an order that the defendant pay the attorney fees incurred by the petition, not to exceed $100, if:
(a) The court enters a judgment requiring that the plaintiff be discharged; and
(b) The court finds that the allegations or defenses in the return were frivolous. [Amended by 1995 c.657 §9; 1999 c.114 §6]