You had ever right to use what ever means to keep your baby safe. Your right you never know when something is going to happen. I have always made a play to pick Moto up when someone comes to greet him for that very reason.
Im also very picky about letting kids pet him. I usually tell the parents he's only a puppy and still in the playful age and that I would rather they not pet him. So far I have had no problems of course if I do I don't care its my dog not theirs. I am not worried about others feelings just my dogs safety.
Don't feel bad for protecting your dog. Would you allow a complete stranger to pick your child up off the ground and bounce it around?
didn't think so.
BTW I wish we had puppy classes around here.