I was hoping to get some additional information from you before answering but want to be sure you have the information you need.
Your dog is going to need some training and your grandson as well. Dogs tend to give puppies a lot of leeway when they are very young and let them get away with behavior they wouldn't allow when they get older such as touching their food, running up on them, pulling ears or getting in their face. Once the pup matures the dog starts reprimanding the pup for behaviors that will not be acceptable when they are mature. In this way, pups learn how to interact with adult dogs. Dogs tend to see babies and toddlers the same way. When they are real young a dog might not react to a baby crawling too close, or taking a toy but once the child starts walking around and running, the dog might start reprimanding the child for unacceptab (in the dog's mind) behavior. Of course, a dog's reprimand is growling and then nipping which you do not want. So your dog needs some training and then your grandson needs to know what behavior is acceptable around dogs and what isn't or he may come in contact with a dog that has no tolerance for children at all.
Many dogs are not good with children and a lot of it does depend on how the children react to a dog. Children are unpredictable at best. They run and howl and squeal for no apparent reason. High pitched noises to a dog signal play time, and with a child running a dog often takes that as an invitation to chase and nip at the heal. In addition, seldom are children taught how to act around dogs. Humans love hugs and kisses while dogs only tolerate this behavior from people they know well. Most dogs do not LIKE hugs and kisses. Dogs don't like other dogs to get in their face which is a trait children do without even thinking about it. Children also think it is fine to take their toys or food which is a no no in the dog world.
So part of the process is teaching children how to react around your dog and dogs in general. Here is a good site that talks about this.https://drsophiayin.com/blog/entry/kids-and-dogs-how-kids-should-and-should-not-interact-with-dogs/ So teaching your grandchild how to react will go a long way toward preventing any inadvertent bites. As for your boy, he will need a lot of obedience training. You can not just take some classes and then figure training is done. Training is a lifelong commitment though you can go to a couple of times a week once your dog listens well. The following site is helpful in helping owners train their dog. Be sure and click on the link to the page on obedience at the bottom. and links on subsequent pages leading to detailed instructions.http://www.schutzhund-training.com/training_theory.html
Training works best if you train at least 30 minutes a day (two 15 minute sessions). I would start making your dog work via the Nothing in life is free program (NILF). It is outlined below. http://www.pets.ca/articles/article-dog_nilf.htm http://www.humanesociety.org/animals/dogs/tips/training_nothing_in_life_is_free.html
You will also need to socialize him around children. You can start by taking him someplace where there are lots of kids but a fence between them and you such as a school yard. You sit with your dog on one side of the fence where he can see children but they can't do anything to him even if they decide to run up. Keep him in a sit or down position and as long as he doesn't react to them, give him treats. if he reacts give a short tug on his lead to get his attention on your and a firm low toned growl like "NO" to indicate the behavior is unacceptable. Once he is fine with kids behind a fence, start this exercise without a fence but keep the children at least an arm's length away. Let the children toss him good treats like hot dog slivers. They are a high value treat to a dog so dogs work well for them. This tossing of treats will start him associating children with good things like treats but only if he behaves and doesn't lunge, nip or carry on. It isn't a quick fix, but hopefully it won't take him too long since you are catching it early. You can not take a chance with a child. What you should have on hand is a basket style muzzle and teach the dog to wear it using positive reinforcement (treats) when he has it on. The muzzle can then be used when children are around to totally prevent any possibility of bites or nips. I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer positively so I am compensated for my time.