If the treasurer takes custody of property delivered under this part and later determines that the property has no substantial commercial value or that the cost of disposing of the property will exceed the value of the property, the treasurer may return the property to the holder or destroy or otherwise dispose of the property. No action or proceeding may be brought or maintained against the state or any officer thereof for or on account of any action taken by the treasurer pursuant to this part with respect to such property.