Black powder can get damp, but it doesn't go bad.
If it does get damp- just dry it out with some sunshine on a piece of copper, a flat rock, or something else like the old mountain men used to do.
Pyrodex, if sealed reasonably well will have a very, very long shelf life. It'll smell funny if it's bad.