(a) Any covenant, promise, agreement or understanding entered into in connection with or collateral to a contract or agreement relative to the construction, alteration, repair or maintenance of any building, structure or appurtenances thereto including moving, demolition and excavating connected therewith, that purports to indemnify or hold harmless the promisee against liability for damage arising out of bodily injury to persons or damage to property caused by or resulting from the negligence of such promisee, such promisee’s agents or employees, is against public policy and void, provided this section shall not affect the validity of any insurance contract, workers’ compensation agreement or other agreement issued by a licensed insurer.

(b) The provisions of this section shall apply to covenants, promises, agreements or understandings entered into on or after the thirtieth day next succeeding October 1, 1977.