C.W.
Sounds more like stress than habit. I bite my nails when I am understress. Needless to say they are down to the quick right now. Sometimes when I catch myself chewing on them I look at them and say to my self but out loud softly. Grow! grow! grow! don't bite1! don't bite! and honestly it works after a couple of times. Then my nails grow til I can't stand the length and I then indulge myself and bite them off. I also do not wear polish of any kind. It weakens my nails.
Good luck it is a mind game.