All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If this doubt is a mere Waswaas (obsessive/devilish whispers), then that person should know that it does not harm him, and what is best for him, without doubt, is to continue obeying his Lord, the Almighty, and avoid these doubts, ignore them, repel them, and not pay any attention to them.
However, if this doubt is real and does not just consist of whispers, then he is not a Muslim until he becomes certain of the existence of Allah and His Oneness. So he must strive to search for the truth, and if he is sincere in his intention and search, then he will find it, because the evidence of the Oneness of Allah is spread out throughout the universe, just like water and air. For more benefit, please refer to fatwa 81529.
Allah knows best.