Actually Cruz can go to court to request a “declaratory judgement” preemptively on a matter that he may be threatened by future lawsuits.
Declaratory judgments still require two actual parties, and an actual (or at least substantially likely) dispute between the parties. The Constitution only grants Federal courts jurisdiction to hear "case[s] or controvers[ies]" - without an actual dispute, it would be an advisory opinion, which courts (Federal courts, at least) are unable to render.