You have analyse everything of an ICO, starting with the team, project, token metrics, previous works of the team, their Linkedin, twitter etc. Try to contact them and see if they are legit. But it's a long researching process to understand whether the ICO is scam or not. However if the team is famous and strong then I don't think you will have a problem of being scammed.