While going through the Qur'an, Surah An-Nisa, I came across Ayah 94. A simpe translation, based on translation by M.A.S.Abdel Haleem says
So, you who believe, be careful when you go to fight in God’s way, and do not say to someone who offers you a greeting of peace, ‘You are not a believer,’(c) out of desire for the chance gains of this life– God has plenty of gains for you. You yourself were in the same position [once], but God was gracious to you, so be careful: God is fully aware of what you do.
(c) A Muslim killed someone in battle who had given him the Muslim greeting, thinking that the man was trying to save himself, but the Prophet condemned this.
While looking to understand this, I came across this Khutbah by Ustadh Nouman Ali Khan, it's embedded below.
This is a very powerful reminder now to judge any Muslim.
More details on Surah An-Nisa' on Islam Awareness Homepage: https://www.islamawareness.net/Quran/VideoLectures/surah004.html