Assalamu Alaykum ustadh, a relative is expected to die soon. The janazah will be held at a barelvi mosque. I am unsure if the imam in particular practices shirk or not. Am I allowed to pray janazah at this mosque since I’m not if the imam practices shirk although there is a chance?

Ustadh AbdulAziz al-Haqqan
If someone does major kufr, then what is safer is not to participate.