To hug or not to hug.... that is the question
Most dogs do not like to be held and/or hugged. When dogs are scared or stressed, they try to communicate that through their body language. So it is very important that you understand your dog's body language and respond accordingly. For example, whenever dogs are stressed or anxious, they tend to lick their lips, yawn, show the whites of their eyes, shake, freeze, growl and bite. If you see this behaviour in your dog while hugging, it means your dog wants you to understand that it is not fun for him/her at all.
It is certainly not that dogs do not like to be touched. On the contrary. Did you know that when your dog leans against you that is a sign of love and trust? The most important thing is to let your dog take the initiative and always give him/her the option and choice to leave.