A polytheist entered Islam

And it was said that whoever saw that a polytheist became a Muslim and spoke in the door of death, then it indicates his death in the religion of Islam, and if his words are contrary to the religion and the way of the Sharia, then he does not become Muslim, and if he becomes Muslim, then it is not established in Islam .