Not unusual for a puppy, especially if he was removed from his litter mates and mother earlier than should have happened, because he may not have learned to inhibit his bite. I am going to differ with Tanza here, as I often find "yelping" to deter this behaviour may instead reinforce it. Think "squeaky toy". If you try that and it works, great. If not, then try something else. Personally I do not allow any dog to bite me with impunity. With a pup, I would restrain him until he quits it (as his mother would do, typically by holding him down with a paw and snarling in his face!). You don't need to be quite that dramatic, but if he bites, tell him "no" sternly, and gently but firmly hold him still until he stops trying to bite. He may struggle. Do not let him go while he is doing this. As soon as he quits and relaxes, release him and praise him. If he goes right back to biting, repeat. He needs to learn there are consequences to his actions that he won't like. And don't give him a chance to get at your hair! Head that off before it happens, with a "no" and physically prevent him from grabbing it.
You need to pay attention with a pup. The best strategy is to stop an action before it really begins, so observe his behaviour and when you can see he is thinking about doing something you don't want, try to redirect his actions to something "legal", like one of his toys. Prevention is better than having to discipline. Good luck! (puppies usually do outgrow the mouthy stage, but you do not want nipping or biting to become a habit.)