Right. It is what the trial is for, and generally the job of the jury is to decide facts. But there is a legal standard that if "no reasonable person could conclude", then we overrule the jury (even after they decided), and also just chuck it before hand.
In civil cases, that is called summary judgment. I'm not sure what it's called in criminal cases, but I'm sure it's called something.