The courts make that finding through the doctrine of
ultra vires. They cannot declare a law unconstitutional but they can decide a law that is sloppily drafted or vaguely written exceeds its authority and so cannot be enforced.
(Denny Crane: "Sometimes you can only look for answers from God and failing that... and Fox News".)