It's extremely rare that consumer AA or AAA batteries will explode. To avoid ruptures, be sure you're not inserting batteries in the wrong direction, especially for long periods of time, and store your batteries (or the devices they're living in) away from heat sources and in dry conditions (to avoid corrosion and deteriorating the case, as well as the battery cavity of the device itself)