The above verse isn't saying not to judge. It is saying not to judge more harshly than you would want done to yourself.
Proverbs 15:21 Folly is joy to him who is destitute of discernment, But a man of understanding walks uprightly.Malachi 3:18 Then you shall again discern Between the righteous and the wicked, Between one who serves God And one who does not serve Him.
1 Corinthians 2:14 But the natural man does not receive the things of the Spirit of God, for they are foolishness to him; nor can he know them, because they are spiritually discerned.
Ecclesiastes 8:5 He who keeps his command will experience nothing harmful; And a wise mans heart discerns both time and judgment...
Philippians 1:9 And this I pray, that your love may abound still more and more in knowledge and all discernment...