I recently visited a house where the puppy had nicked a 4 year old boy’s face with his teeth. The parents were understandably worried that their dog was turning into a biter. I was concerned myself and arranged to meet with them as soon as possible, worried that the dog would need to be re-homed, or muzzled until re-trained and possibly a behaviorist called in. Luckily, Baron turned out to be a friendly pup, and the little boy a little too enthusiastic about hugging.
Dogs don’t view hugging in the same way that humans do. Please be sure that your children are safe around dogs. If they do hug your dog, or your friends’ dogs, ensure that they are gentle, and that the dog is not distressed. The dog should be able to easily pull away, and be allowed to do so if he finds the contact a little too much.
Here is a good article on the subject: http://www.dog-games.co.uk/hugging.htm