Yes, I have been bitten. Twice, as a matter of fact. Both times it was my own fault. Still, after all the hundreds of other people's dogs that I've handled, to only have been bitten twice is a pretty good record.
Dogs, like humans, have good days and bad days. Sometimes they're just plain cranky from a toothache, a sore paw or a dozen other ailments. If you handle a dog that doesn't know you, he just might bite you during these times.
You have to get a strange dog's permission to approach him. Don't automatically assume that your friend's little fluffy lap dog is going to accept you right away.
Dogs can size you up amazingly fast by smelling your scent. They can determine your age, state of health, and what you last ate. There are about two dozen other things they can tell about you at the first scent. They can also tell if you're a good person or not.
I know that you might wonder about this last part, but, I assure you that they know your character in about two seconds. I saw my dog Lucy approve of all my friends when she met them for the first time. But, when a stranger came into the house to talk business, Lucy refuse to offer him a friendly greeting. In fact, she emitted a low growl. The man turned out to be a flim flam scammer and, warned by Lucy's judgement of him, I didn't fall for his scheme.