Not legally, it isn't.
We've gotten so used to judges over-ruling the president at every turn, that you may be under the impression that low-level federal judges can just do anything they want, so long as it is motivated by someing legitimate such as Trump Derangement.
What you may not have noticed is that nearly all of such rulings are temporary, pending the lawyers that filed the lawsuits presenting evidence that what Trump was doing is unlawful. Then many of the restraining orders are over-turned by higher courts. Because it is NOT illegal, for example, to deport an illegal alien.
So, sure. A judge may "throw out" the case against Comey. But the dismissal will be appealed and the prosecution will win the appeal. Mainly because factually, Comey certainly lied under oath and to congress. Higher courts take a dim view of lying under oath.
The terrible part is that even if somehow Comey is guilty, he will experience the adage that "the process is the punishment" first hand. That gandar sauce probably won't taste as good to Comey as when he was feeding it to the goose.