ANSWER:

You are praying behind a person and not behind a masjid! What counts is the the aqeedah of the imam. If you don’t know his aqeedah, the default is that he is muslim until proven otherwise. 

Sheikh, the hanafi mosque near me has a chart of Allah’s names and “ya allah” in Arabic written. On the left side there is “ya Muhammed” with a chart of his names. They celebrate mawlid and do bidah like shab e barat and dua after prayer and the imam looks like a normal imam, can I pray behind them?

Prayer, Rulings on mosques |