Any founder, making a gift or grant for any of the purposes mentioned in this article, may, at any time thereafter, by last will or testament, devise or bequeath to the state all or any of the property, real and personal, mentioned in the gift or grant, or in any supplemental grant or gift, and the devise or bequest shall take effect if, from any cause whatever, the gift or grant is annulled or set aside, or the trusts therein declared for any reason fail. Such devise or bequest is suffered to be made by way of assurance that the intentions of the grantor shall be carried out, and in the faith that the state, if it succeeds to the property, or any part thereof, will, to the extent and value of the property carry out, in respect to the objects and purposes of the grant, all the wishes and intentions of the grantor.