Improve isKeyword and isType.