If it is coughing and/or gagging and only occasional, I would just keep an eye on him. If he swallowed something it will hopefully come out and you will know what it was. As for things not showing in xrays...that is very true. Corn cobs are horrible and get lodged in dogs and you cannot see them on xray.
Since they did the barium and all was moving along, I doubt it is something in his gi tract. I might be more concerned about his lungs but since he is only doing it occasionally, it really may just be an irritation to his throat.
Hopefully it is really nothing much and will continue to improve!

Keep us posted please!