Whenever under the terms of any annuity or policy of life insurance, or under any written agreement supplemental thereto, issued by any insurance company, domestic or foreign, lawfully doing business in this State, the proceeds are retained by such company at maturity or otherwise, no person entitled to any part of such proceeds, or any instalment of interest due or to become due thereon, shall be permitted to commute, anticipate, encumber, alienate or assign the same, or any part thereof, if such permission is expressly withheld by the terms of such policy or supplemental agreement; and, further, that such company shall not be required to segregate such funds, but may hold them as a part of its general corporate funds.
40 P.S. § 514