checking if any building is already registered in the database
checks if a building already exists or not