It is not a worm as it lacks a clitellum (saddle) not to mention the absence of segmentation. (Sorry Bel).
It is definitely harmless and your son is in no potential danger what-so-ever - bar swallowing it and chocking.
My guess is that it is a species of blind snake. You can confirm this by examining the specimen and seeing if the following features are present. If it has very small scalesthat are “joined” rather that overlapping, so that the surface is extremely smooth no matter which way you rub it. The eyes will be small black dots and the tail end often has a small terminal spine. These critters often give off an objectionable odour when you pick them up. No ear openings visible and no mouth opening visible.
If I had to take a guess at its identity, I would say Ramphotyphlops wiedii.
Blue