Merge "Add check that TypeIndex is valid in StringByTypeIdx."