A certificate of occupancy is required in advance of occupancy or use of: a. A building hereafter erected; b. A building hereafter altered so as to affect height, or side, front or rear yards; c. A change of type of occupancy or use of any building on premises.