One year old bad habit

Idk if to take him to the doctor or what but one year old son randomly hits his head on the walls or on the fridge like he dose it propose he will bang his back of head on the walls I always stop him and tell him no