I agree with the previous posters who have said it’s probably okay, as it’s only a couple years old. However, roshea has a good point about sun and rain—both can affect the integrity of the helmet in ways that are tough to see. The Bicycle Helmet Safety Institute says you should probably replace your helmet if the colors on the shell are fading or if there are small cracks around the vents; but it would probably take a really long time in the sun for most modern helmets to get to this point. Sounds like your helmet is almost certainly safe. How much faith you want to put in a helmet that’s “almost certainly safe” instead of “certainly safe” is up to you, and how much you’re willing to risk your head to save a few dollars!