How do you know if the food you are craving is actually ok to eat?

I'm currently craving a snickers bar really bad but then I remember reading somewhere that you shouldn't eat peanuts, is this true? Does that mean that I just have to put up with this peanut craving I have even though it's driving me nuts (pardon the pun)