Section 129C. No person, other than a licensed dealer or one who has been issued a license to carry a pistol or revolver or an exempt person as hereinafter described, shall own or possess any firearm, rifle, shotgun or ammunition unless he has been issued a firearm identification card by the licensing authority pursuant to the provisions of section one hundred and twenty-nine B.
...
The provisions of this section shall not apply to the following exempted persons and uses:
...
(h) Possession of rifles and shotguns and ammunition therefor by nonresidents traveling in or through the commonwealth, providing that any rifles or shotguns are unloaded and enclosed in a case;