Air rifles and bb guns are not firearms under Massachusetts law.The definition of “firearm” varies wildly depending on exactly which part of the MGLs you’re looking at.
ETA: I can’t say that air rifles DONT meet the definition of “firearm” as defined in 140MGL121, which is what’s referenced I. 269MGL12E (discharging a firearm within 500ft),but the fact that they have their own rules laid out in 269-12B makes me believe that 12E doesn’t apply.
"M.G.L. c. 269, § 12B is the exclusive statutory regulation of air rifles an BB guns" Commonwealth v. Rhodes, 389 Mass. 641 (1983), see also Commonwealth v. Fenton, 395 Mass. 92 (1985).