(a) If, upon petition, the court finds that the grantor and all beneficiaries consent to the modification or termination of a noncharitable irrevocable trust, the court shall approve the modification or termination even if the modification or termination is inconsistent with a material purpose of the trust. A grantor's power to consent to a trust's modification or termination may be exercised by an agent under a power of attorney only to the extent expressly authorized by the power of attorney or the terms of the trust instrument; by the grantor's conservator with the approval of the court supervising the conservatorship if an agent is not so authorized; or by the grantor's guardian with the approval of the court supervising the guardianship if an agent is not so authorized and a conservator has not been appointed.
(b) A noncharitable irrevocable trust may be terminated upon consent of all of the beneficiaries if the court concludes that continuance of the trust is not necessary to achieve any material purpose of the trust. A noncharitable irrevocable trust may be modified upon consent of all of the beneficiaries if the court concludes that modification is not inconsistent with a material purpose of the trust.
(c) A spendthrift provision in the terms of the trust instrument is presumed to constitute a material purpose of the trust.
(d) Upon termination of a trust under subsection (a) or (b) of this section, the trustee shall distribute the trust property as agreed by the beneficiaries.
(e) If all of the beneficiaries do not consent to a proposed modification or termination of the trust under subsection (a) or (b) of this section, the modification or termination including any distributions of the trust property, may be approved by the court if the court is satisfied that:
(1) If all of the beneficiaries had consented, the trust could have been modified or terminated under this section; and
(2) The interests of a beneficiary who does not consent will be adequately protected.