Section 158. No policy of insurance and no annuity or pure endowment contract issued to a resident of the commonwealth by an authorized company organized under the laws of a foreign country shall be invalidated by war between such foreign country and the United States.