Like many children, 9-year-old Gracie Ingram used her hands to soothe herself as a baby.
"When I was little, instead of sucking a pacifier I sucked my fingers instead," she told CBS News.
And like many parents, her father Chris couldn't seem to stop her. "We felt like we ought to discourage it but she was pretty tenacious," he said.
But it turns out Gracie's habit may have actually been good for her health.
A new study published in the journal Pediatrics shows children who bite their nails and suck their thumbs are about one-third less likely to develop certain allergies.
"Cat, grass, house dust mite, and dog [allergies] -- those were reduced, some significantly, some borderline," said study author Malcolm Sears, a researcher for the Firestone Institute for Respiratory Health at McMaster University School of Medicine, in Ontario, Canada.
Researchers say the findings may be another example of what's called the hygiene hypothesis, the idea that being overly clean and avoiding exposure to the microbes in the environment may increase a child's risk of allergies.
"Early exposure to dirt is not a bad thing," Sears said. "When they suck their thumbs or bite their nails they're exposing themselves to additional microbes or dirt which is stimulating the immune system."
For the study, researchers measured the thumb-sucking and nail-biting habits of over 1,000 children in New Zealand at ages 5, 7, 9 and 11. Skin-prick allergy tests were then performed on the subjects when they were 13 and 32 years old.
An analysis showed that of all the children, 31 percent were frequent thumb suckers or nail biters.
When they were tested at age 13, the number of children showing sensitivities toward allergens was lower among those who had sucked their thumbs or bitten their nails -- about 38 percent -- compared with those who did not, at 49 percent.
The association remained present at age 32, despite other factors that could have influenced allergic sensitivities, including the person's sex, parental history of allergies, pet ownership, breast-feeding and parental smoking.
However, the findings don't necessarily mean parents should start telling their kids to bite their nails or suck their thumb. The American Dental Association advises that while thumb- or finger-sucking is a natural reflex in young children, intense sucking can cause problems with a child's tooth alignment.
"While we don't recommend that these habits should be encouraged, there does appear to be a positive side to these habits," Sears said in a statement.
As one mother put it, perhaps it's best to just let kids be kids.
"You should be out playing in the grass and playing in the dirt... right?" Salima Milliot asked. "That's what kids should do."