I am an investigative reporter who covers crime, and my sources often insist on anonymity. There are ways to mitigate the possibility of being lied to.
All of my sources know that we have a deal: I promise to do everything that I reasonably can to keep their identity secret, and they promise me the truth. If a source lies to me or intentionally misleads me, my agreement to keep their identity secret no longer stands.
There’s more to it than that, but that’s the gist, and it has worked well for years. I have never burned a source, and as far as I know, I have never published an investigative story that is wrong about anything material.