That bottle of dressing, package of meat, or bag of all-purpose flour (yep, flour can go bad): you kept intending to use them up, or forgot they were there until you needed them. Grabbing a product with the longest-lead (meaning farthest-out) expiration date is a skilled supermarket habit, but on occasion, the freshness still gets away from us. It’s tough to know when an expiration date can go from gently pushing your luck to putting yourself in danger.

However, in some cases, you may not be in harm’s way by eating past the date—says Kristin Kirkpatrick, RD, a registered dietitian at the Cleveland Clinic: “Expiration dates … [are] actually more about quality than they are about food safety. So, when you look at things like the sell by date, that is typically a date that is going to be a guide for grocery manufacturers: When can I sell this by? The best-by date is really an assessment of quality. So, this cracker is going to taste great now, but maybe in four weeks from now, it won’t taste as good. So that is the best-by date.”

Foods that Kirkpatrick says you should avoid eating past the expiration or best-by are things like infant formula, eggs, and meat, as just a few. And don’t overlook—literally—the power of your senses. One effective way to check food safety, Kirkpatrick suggests, “is by looking at it and smelling it.”

Just keep in mind, that’s not always a guaranteed method for detection. A dietitian is different from a food safety scientist or quality inspector. Microbes can grow without detectable changes in the food, and the foods—along with the circumstances in which foodborne germs can grow—can be surprising. For example, one 2005 case study shared the account of a child who died after exposure to pasta that had spent hours outside at a summer picnic. A similar effect occurred to a 20-year-old who was found dead after eating pasta that had sat out at room temperature for a number of days. Rice is also an often-unsuspected culprit—in fact, in the U.S., food safety officials have shut down restaurants over cooked rice was kept at an unsafe temperature.

And it’s not always lukewarm levels that create the problem. Listeria is one type of foodborne bacteria that can proliferate even at temperatures close to freezing.

In sum, use common sense and err on the side of caution. Read up on the foods you should never eat past the expiration date and other food storage surprises.

For food safety news like national recalls, subscribe to The Healthy newsletter and follow The Healthy on Facebook and Instagram. Keep reading: