California’s state Senate has just approved an important new bill that would help people convicted of crimes due to bad science win new trials. Let’s hope it gets passed into law.

One of the most important things we’ve learned from DNA testing is that we have badly misjudged the reliability of a number of methods of forensic analysis. Most fields of forensics were developed by police investigators, not scientists, and aren’t subject to the rigorous standards of the scientific method, such as blind testing and peer review. Yet these methods are still presented to juries as “science.”

In 2009, the National Academy of Sciences issued a groundbreaking and disturbing report on how forensic analysis is used in America’s courtrooms. The NAS found that in nearly all forensic specialties, expert witnesses commonly overstated the certainty of their findings. Some once-common specialties, such as compositional ballistics, bite mark matching, handwriting analysis and burn pattern analysis, have shown to be without scientific merit. Others, such as hair fiber analysis, carpet fiber analysis, blood spatter pattern analysis and tool mark pattern analysis, have some value, but their significance has been routinely overstated in court. Even within a creditable forensic specialty, common theories that once put people in prison have been called into question, such as the “Shaken Baby Syndrome” diagnosis among medical examiners.

One problem with using even actual science in criminal cases is that science is always evolving. Theories are regularly improved, altered or discredited entirely. Analysis that’s presented as science but hasn’t actually been subjected to the scientific method is even more likely to later come under scrutiny. But once someone is convicted of a crime, the criminal justice system puts a premium on securing the finality of the verdict. To convict you, a prosecutor must convince that you are guilty “beyond a reasonable doubt.” But once you’ve been convicted, it becomes extremely difficult to overturn that verdict.

These attributes of the two institutions — the evolving nature of science and the emphasis on finality after conviction — can be a recipe for injustice. To make matters worse, the criminal courts have been pretty awful about letting bad science into the courtroom. Charlatans with little to no scientific training have been permitted to testify in cases that send people to prison — or to death row. (The courts have been much more vigorous about this in civil cases, although there have still been some problems.)

For the most part, the courts have bought into DNA testing. That’s in part because DNA testing came from the field of science. But the certainty of DNA testing has also proved that many other methods of analysis are deeply flawed. And when those same flawed methods of analysis are used to convict people in cases for which DNA isn’t a factor, the courts have been far more reluctant to second-guess convictions. But if an unproven method of analysis like, say, bite mark matching is shown to have convicted the wrong person in one case by DNA testing, why would we continue to treat that sort of analysis credulously in cases for which DNA isn’t a factor?

The new law in California attempts to address that discrepancy. It’s a reaction to an astonishingly shortsighted recent California Supreme Court decision that found expert testimony in a criminal case is opinion, therefore it can’t be “wrong.” Perhaps on some level, that’s true. But it is also enormously influential with juries. In that particular case, the court denied a new trial for William Richards, who was convicted based on bite mark testimony from an “expert” witness who claimed that only 2 percent of the population could have made a bite mark left on the victim’s hand. The witness then testified that Richards was part of that 2 percent. The witness’s assertions were balderdash. There’s zero scientific or empirical to support bite mark matching or to claim that marks left in skin could be narrowed down to some precise proportion of the population.

Yet the California Supreme Court found that this was mere opinion that can’t be proved right or wrong. Even if that is true, consider the implications of such a standard. The scientific method is about disproving theories. Theories that can’t be either supported or disproved by hypotheses and testing aren’t scientific theories. Under this opinion, the more untestable the theory, the more likely it is to survive a challenge. Never mind that it may have been presented to the jury as if it were science.

This new bill, sponsored by state Sen. Mark Leno (D-San Francisco), seeks to address and remedy these problems. Under the proposed law, if an expert later repudiates his testimony or if an expert’s testimony is later found to be unsupported by science, the convicted have grounds for a new trial. There are some nagging questions, such as what sort of consensus would be needed in the scientific community for the law to apply. In Richards’s case, there’s almost universal consensus. But on a topic such as Shaken Baby Syndrome, there’s still much heated debate.

Still, it’s a sensible bill that will at least address the most egregious cases. Other states should consider passing similar laws — or better yet, pass more robust safeguards to keep junk science out of criminal trials in the first place. (With some exceptions, most other states and courts have taken similar approaches to outdated science, though perhaps not as explicitly as the ruling against Richards.)

The last time California considered such reasonable criminal justice reforms, they passed both houses but were then vetoed by then-Gov. Arnold Schwarzenegger after lobbying from the powerful California District Attorneys Association. That organization is lobbying against this bill, too.