Any domestic life company shall have the power to hold the proceeds of any policy issued by it under a trust or other agreement upon such terms and restrictions as to revocation by the policyholder and control by beneficiaries, and with such exemptions from the claims of creditors of beneficiaries other than the policyholder as shall have been agreed to in writing by such company and the policyholder. Upon maturity of a policy in the event the policyholder has made no such agreement, the company shall have power to hold the proceeds of the policy under an agreement with the beneficiaries. Such company shall not be required to segregate funds so held but may hold them as part of its general company assets. A foreign or alien company, when authorized by its charter or the laws of its domicile, may exercise any such powers in this State.
215 ILCS 5/241