When my daughter Anne's cat, Lucky, was still a kitten, and Anne was about 3, they used to have mad romps and sometimes he would nip her in self defence. I caught them once, after Lucky had squeaked and asked what was going on. "He bitted my ear so I bit his" she said....... Not something I recommend but curiously, it worked!
Mr T nips sometimes if I stroke him too much in one place. It happens when Im falling asleep and on a sort of "automatic pilot" He nips me to make me move my hand to somewhere else.