The right of a person to a pension, an annuity, or retirement allowance, or disability allowance, or death benefits, or any optional benefit, or any other right accrued or accruing to any person under the provisions of this chapter, and any fund created hereby, and all moneys and investments and income thereof, are exempt from any state, county, municipal, or other local tax, and shall not be subject to execution, garnishment, attachment, the operation of bankruptcy or insolvency laws, or other process of law whatsoever, whether the same be in actual possession of the person or be deposited or loaned and shall be unassignable: PROVIDED, That benefits under this chapter shall be payable to a spouse or ex-spouse to the extent expressly provided for in any court decree of dissolution or legal separation or in any court order or court-approved property settlement agreement incident to any court decree of dissolution or legal separation.