You can file suit before new ordinance is past seeking a judicial determination that you have a prior non conforming use, or, you can wait unti after it is passed and you are ticketed then file suit. The risk of waiting is the Court denying your request for relief at the outset, and having to go through 2 years of litigation before you can use your property again,