Before investing in the company, I advise you to check the information about the company on different sites and forums. This will reduce your chances of investing in the ICO scam.
Before investing in any ICO, I usually check the reviews on various ICO review sites. But the problem is that they are not 100% reliable. I would say that no matter how much precaution you take, there is always a very high chances of getting trapped in a fake ICO.