Aiyooo mama, at that age boleh jadi both lah, teething memang bikin dia frustrated dan sometimes they bang their head sebab sakit gigi, tapi some babies also do it when they're learning to walk or just exploring how their body works (very normal development). A few mum friends I know, their babies pun did the same thing around 9-10 months, pastu lepas nak walk steady sikit dah kurang. The thing is, kena monitor lah, if it's gentle and playful okay, but if he's hitting hard or doing it repeatedly sangat, best to mention it to your paediatrician just to check everything's fine.