Tightened up the string checking.