Indeed, the very chapter of the Sermon on the Mount that begins at verse one with "Judge not, that ye be not judged." - at verse fifteen gives us this exemption: we are to judge the truth/falseness of doctrine by looking at the fruits of the person speaking:
Beware of false prophets, which come to you in sheep's clothing, but inwardly they are ravening wolves. Ye shall know them by their fruits. Do men gather grapes of thorns, or figs of thistles? Even so every good tree bringeth forth good fruit; but a corrupt tree bringeth forth evil fruit.
A good tree cannot bring forth evil fruit, neither [can] a corrupt tree bring forth good fruit. Every tree that bringeth not forth good fruit is hewn down, and cast into the fire. Wherefore by their fruits ye shall know them. - Matthew 7:15-20
Jhn 8:7 So when they continued asking him, he lifted up himself, and said unto them, He that is without sin among you, let him first cast a stone at her.
Jhn 8:8 And again he stooped down, and wrote on the ground.
Jhn 8:9 And they which heard [it], being convicted by [their own] conscience, went out one by one, beginning at the eldest, [even] unto the last: and Jesus was left alone, and the woman standing in the midst.
Jhn 8:10 When Jesus had lifted up himself, and saw none but the woman, he said unto her, Woman, where are those thine accusers? hath no man condemned thee?
Jhn 8:11 She said, No man, Lord. And Jesus said unto her, Neither do I condemn thee: go, and sin no more.