The provisions of the technical codes relating to the construction, alteration, repair, enlargement, restoration, relocation or moving of buildings or structures shall not be mandatory for existing buildings or structures identified and classified by the state or local jurisdiction as historic buildings, if such buildings or structures are judged by the building official to be safe and any proposed construction, alteration, repair, enlargement, restoration, relocation or moving of buildings will facilitate or ensure the public's health, safety and welfare.