Notwithstanding any law to the contrary, any person who is required to deposit a bond for any reason by this state or any political subdivision of this state may deposit an amount of cash or a certified or cashier's check equal to the amount of the required bond in lieu of such bond. Nothing in this section shall affect the existing law applying to criminal appearance bonds in criminal cases.