A trust of real or personal property, or real and personal property combined, created either heretofore or hereafter by an employer as part of a pension plan, disability or death benefit plan, or profit-sharing plan for the exclusive benefit of some or all of his or its employees, to which contributions are made by such employer or employees, or both, for the purpose of distributing to such employees the earnings and the principal of such trust, shall not be deemed to be invalid as violating any existing laws against perpetuities, restraints on alienation, suspension of the power of alienation, or the accumulation of income; but such a trust may continue for such time as may be necessary to accomplish the purpose for which it may be created.
No trust of real or personal property, or real and personal property combined, created either heretofore or hereafter under a retirement plan for which provision has been made under the laws of the United States of America exempting such trust from federal income tax shall be deemed to be invalid as violating any existing laws against perpetuities, restraints on alienation, suspension of the power of alienation of title to property, or the accumulation of income; but such a trust may continue for such time as may be necessary to accomplish the purposes for which it may be created, may be permitted to accumulate the income arising from the property held therein until such time as such income shall become distributable to the beneficiary or beneficiaries under the terms of the trust, may according to its terms be made irrevocable, and the interests of its beneficiary or beneficiaries therein may be made nontransferable by assignment or otherwise.