The owners, operators, or users of shooting ranges shall not be subject to any action for nuisance and no court shall enjoin the use or operation of a range on the basis of noise or noise pollution, provided that the owners of the range are in compliance with any noise control ordinance that was in existence at the time the range was established, was constructed, or began operations.