Where any constituent corporation or the consolidated corporation is, or would be if formed under this chapter, a charitable corporation under section 201 (Purposes) of this chapter, no certificate shall be filed pursuant to section 904 (Certificate of merger or consolidation; contents) or section 906 (Merger or consolidation of domestic and foreign corporations) until (a) the supreme court has granted an order approving the plan of merger or consolidation and authorizing the filing of the certificate, as provided in section 907-a (Application for approval of the supreme court) of this article or (b) the attorney general has approved the plan of merger or consolidation and authorized the filing of the certificate, as provided in section 907-b (Application for approval of the attorney general) of this article.