If the property taken is claimed by any person other than the defendant, and that person makes an affidavit of title to the property or the right to the possession of it, stating the grounds of the title or right, and serves it upon the peace officer taking the property while the property is still in the peace officer's custody, the peace officer may release the property unless the plaintiff, on demand of the officer, indemnifies the peace officer against the third party claim by a written undertaking approved by the clerk of court and executed by sufficient sureties.