No change of occupancy or use shall be made in a building hereafter erected or alter that is not consistent with the last issued certificate of occupancy for such building, unless a permit is secured. In the case of an existing building, no change of occupancy that would bring it under some special provision of this article shall be made, unless the building official finds, upon inspection, that such building conforms substantially to the provisions of the law with respect to the proposed new occupancy and use and issues a certificate of occupancy thereof. The use of a building shall not be deemed to have changed because of temporary vacancy or change of ownership or tenancy.