Did he bite down or just hold on? What part of the body was it, hand, finger, arm?
If I'm holding a macaw and it goes to bite, I'll drop him/her ont he floor in a heartbeat. I let them walk around a few seconds then pick them back up (Most, not all, birds hate being on the floor.)
Or i'll give my arm a little shake when they go to put their beak on me, this'll make them have to balance and they forget about the bite.
If my B&G tries to bite while holding onto my finger, I push down towards her throat so her head is forced back (not hard.) She lets go.
Just be careful, its a bird you don't know and GW's can do a LOT of damage.