Any contract hereafter made in this State for the purchase and sale of realty shall be interpreted as including an agreement that the parties shall have the following rights and duties, unless the contract expressly provides otherwise:
(1) If, when neither the legal title nor the possession of the subject matter of the contract has been transferred, all or a material part thereof is destroyed without fault of the purchaser, the vendor cannot enforce the contract, and the purchaser is entitled to recover any portion of the price that he has paid;
(2) If, when either the legal title or the possession of the subject matter of the contract has been transferred, all or any part thereof is destroyed without fault of the vendor, the purchaser is not thereby relieved from a duty to pay the price, nor is he entitled to recover any portion thereof that he has paid. (1959, c. 514.)