At the termination of a trust, the trust property shall be disposed of as follows:
(a) In the case of a trust that is revoked by the settlor, as directed by the settlor.
(b) In the case of a trust that is terminated by the consent of the settlor and all beneficiaries, as agreed by the settlor and all beneficiaries.
(c) In any other case, as provided in the trust instrument or in a manner directed by the court that conforms as nearly as possible to the intention of the settlor as expressed in the trust instrument.
(d) If a trust is terminated by the trustee pursuant to subdivision (b) of Section 15408, the trust property may be distributed as determined by the trustee pursuant to the standard provided in subdivision (c) without the need for a court order. Where the trust instrument does not provide a manner of distribution at termination and the settlor’s intent is not adequately expressed in the trust instrument, the trustee may distribute the trust property to the living beneficiaries on an actuarial basis.