Newswise — When checking your child's Halloween candy to make sure it is safe to eat, also keep in mind the candy's shelf life, according to Kansas State University food experts.

K-State's Karen Blakeslee, research and extension associate for food safety, and Fadi Aramouni, professor of food science, say that the shelf life of candy can vary.

"The shelf life depends on the type of candy, packaging and storage conditions," Blakeslee said. "Shelf life can vary anywhere from two weeks to a year."

More specifically, Aramouni said these factors contribute to how long the quality of the candy lasts. In terms of safety, he said the shelf life of some candy, like hard candy, may be indefinite; however, he said there have been cases of salmonella poisoning from the consumption of expired chocolate.

"It depends on properties of the candy itself: how much moisture is in it and how much fat," Aramouni said.

According to Blakeslee, if a candy appears extremely sticky or has a grainy texture, then it has most likely expired due to temperature abuse and the crystallization of sugar. As a result, she said, it may develop an off flavor, have a change in color or turn moldy if it contains fruits or nuts.

A general rule to follow is that the softer the candy, then the shorter the shelf life it will have. Keeping candy in a cool, dry and dark place is the best way to store it, Blakeslee said.

"The less exposure to air, the better," she said. "Also, store it at room temperature. Heat can cause many candies to melt and get too sticky. Chocolate can get a powdery look to it -- called bloom -- because of temperature changes, but it is still fine to eat."

So the next time a craving for candy strikes, Aramouni recommends checking labels and staying level-headed.

"It is OK to throw away old candy," he said. "Don't feel compelled to eat it. It's mostly empty calories after all."

For more specific information Aramouni and Blakeslee recommend the following guidelines from the National Confectioners Association regarding the shelf life of various types of candy.

* Chocolate: Dark chocolate can be kept for one to two years if wrapped in foil and stored in a cool, dark and dry place. Milk and white chocolates last no more than eight to 10 months.

* Hard candy: Lollipops, roll candy and butterscotch candies can last up to a year when stored at room temperature or in cool, dry conditions.

* Jellied candies: Upon opening the packaging and storing at room temperature, jellied candies can last six to nine months.

* Gum: Most gum products can last six to nine months as long as the packaging remains sealed.

* Caramel: When stored properly at room temperature and away from the heat and light, caramel candy can last six to nine months -- and even up to a year in some cases.