Cans can explode in your luggage that is put in the cargo compartment, it happened to a friend with shaving cream, needless to say they had a mess. Try to use a pump spray or put the can in your carry on instead.
Yes, you can check you bag with hairspray in it. But, be forwarned: I flew to Singapore
once and my bag did not get there. Why? Because the hair spray cap got knocked off in
the bag and the can started making "spewing" sounds. The airline became alarmed and thought it may have been something "dangerous" (like a bomb") and pulled the bag. When they x-rayed and opened the bag, they found the hair spray can. It was put on the next flight out and it finally caught up with me two days later.
So, take care. Maybe you might want to put it in your carry-on rather than check it. Or,
use that good old standby: Duct tape the lid.
If you pack at one atmosphere pressure and then end up at another lower atmospheric pressure (higher altitude) when you open some jars you may have contents start coming out. I really got a laugh when my wife was opening a jar of cream and it just kept coming out. The air in side had been closed at a lower altitude (higher atmospheric pressure) and when opened at a higher elevation (lower atmosphereic pressure ) things begin to flow form high pressure to low pressure.
word of less wisdom but experience.....put anything that may ruin clothes in a ziplock. Just ruined a silk nightie when cabin pressure caused body butter to leak. I had it in ziplock to travel to....but forgot to bag it home. Figures I pick the wrong direction to be careful.