(a) (1) A noncharitable irrevocable trust may be terminated on consent of the trustee and all beneficiaries if the court concludes that continuance of the trust is not necessary to achieve any material purpose of the trust.
(2) A noncharitable irrevocable trust may be modified on consent of the trustee and all beneficiaries if the court concludes that modification is not inconsistent with a material purpose of the trust.
(b) The existence of a spendthrift provision or similar protective language in the terms of the trust does not prevent a termination of a trust under subsection (a)(1) of this section.
(c) On termination of a trust under subsection (a)(1) of this section, the trustee shall distribute the trust property as agreed by the beneficiaries.
(d) If not all beneficiaries consent to a proposed modification or termination of the trust under subsection (a) of this section, the modification or termination may be approved by the court if the court is satisfied that:
(1) If all beneficiaries had consented, the trust could have been modified or terminated under this section; and
(2) The interests of a beneficiary that does not consent will be adequately protected.