3. In any action or proceeding in which it is sought to apply trust assets for a purpose other than a purpose of the trust as stated in subdivision one or subdivision two of section seventy-one
- (a) it shall be the duty of the trustee, if he is a party, to defend the trust against such application, and if he knows of the action or proceeding but is not a party, to make application for intervention therein for the purpose of defending the trust;
- (b) any beneficiary of the trust having a trust claim may intervene in the action or proceeding to defend the trust against such application.