Is it ever right to judge others according to the Bible?

Bible teaches not to judge others but to examine ourselves