The problem usually is that common gun oils and cleaning agents react with the foam. One gun that was notorious for being damaged by being stored in the foam lined case was the original .44 AutoMag. Larry Grossman had a small cottage industry for himself refinishing guns who's finish was etched by the foam in the plastic cases.
Bruce