If at least one of the trustees of a trust is a qualified person, the settlor or a trustee of the trust may petition the court to determine before the settlor's death that the trust is valid and enforceable under its terms, subject only to a subsequent revocation or modification of the trust.