Hey, I have been through this when my daughter was around 4. She still does it sometimes but not as much as she used to. All you have to do is keep the kid distracted as and when you see that he is biting his nails. You can give him something to do, like playing with the dough, a paper and pencil to scribble etc. Else, you can tell the child that there are little tiny germs on his fingers which if he will put in his mouth will go in his tummy and grow big there. Since, he is a preschooler, he may get find it gross and wouldn't do it. http://kidshealth.org/en/parents/nail-biting.html http://www.realsimple.com/health/how-to-stop-biting-nails/nail-biting
My daughter as a toddler had this habit of nail biting. I would keep telling her not to bite nails, give a light tap on her hands whenever she would bite nails. Eventually she left the habit.