Do 16g CO2 cartridges have a shelf life?
They last pretty much forever provided they haven't been damaged (e.g. punctured or rusted or something), so go ahead and use them. 

If you really want to check them, you can buy a few new ones and weigh them on a scale (and compare the weights of the old cartridges to the new ones). If they're significantly lighter, they've leaked and throw them out. Else, go ahead and use them. But a few years (say less than a decade) is pretty much nothing in terms of having issues with the cartridges leaking.