Refactored reserved word checking in getInternalName to make testing easier