Kindly refer to the following link(s):
Can I pray after a person who is an innovator?
Praying behind an Imam who does Shirk or is an Innovator | Sh. Assim Al Hakeem
Imam says its OK to write taweez with numbers, Ayahs of Quran, Can I pray behind him
Can we pray behind an imam whose aqeedah is not clear to us?
Can I pray in Barelvi Masjid where Imam believes Prophet is created from Allah's Light (Noor)?
Can we pray behind a Deobandi Imam?
Can a layman do Taqleed? (Blind following)
Masjid where they fixed prayer time, Imam prays in an elevated spot, make congregation dhikr
Can we pray behind an imam whose aqeedah is not clear to us?
Can I pray in a Barelvi Masjid because I can't focus when praying alone?