a. Whenever necessary to make an inspection to enforce any of the provisions of this Code, or whenever the building inspector has reasonable cause to believe that there exists in any building or upon any premises any condition or code violation which makes such building, or premises or the electrical, gas, mechanical or plumbing systems therein unsafe, dangerous or hazardous, the building official may enter such building or premises at all reasonable times to inspect the same or to perform any duty imposed upon the building official by the technical codes, provided that if such building or premises is occupied, proper credentials shall be presented prior to a request for entry. If such building or premises is unoccupied, the building official shall first make a reasonable effort to locate the owner or other person having charge or control of same and request entry. If entry is refused, the building inspector shall have recourse to every remedy provided by law to secure entry, including issuance of inspection warrant by the magistrate court. b. When the building inspector shall have first obtained a proper inspection warrant or other remedy provided by law to secure entry, no owner or occupant or any other person in charge, care or control of any building, structure or premises shall fail or neglect, after proper request is made, to promptly permit entry therein for the purpose of inspection and examination.