Public Utilities Exempted. The foregoing provision of this chapter concerning the required removal of nonconforming buildings and uses, and the reconstruction of nonconforming buildings partially destroyed, shall not apply to public utility buildings and structures when such buildings and structures pertain directly to the rendering of the service or distribution of a utility, such as steam electric generating stations, electric distribution and transmission substations, communications equipment buildings, water wells and pumps, gas storage, metering and valve control stations; nor shall any provision of this chapter be construed or applied so as to prevent the expansion, modernization or replacement of such public utility buildings, structures, equipment and features, as are used directly for the delivery of or distribution of the service, provided that this section shall not exempt such uses from the provisions hereof covering nonconformity of such buildings, structures or uses, as to those not immediately related to the direct service to consumers, such as warehouses, storage yards and the like.