As long as you're not holding, hitting your opponent's arms is legal. Though I don't see much use in it for it in the amateurs. One thing that you could do is check (press against) their bicep as their starting the swing, and then quickly follow up with your other hand. That can be dangerous if you don't know what you're doing. Personally seeing as swings are easier to counter, I'd prefer to either duck under it, or roll inside of their arm and counter