Object getPdxStringForIndexedPdxKeys(Object key) {
    if (isIndexedPdxKeys) {
      if (key instanceof String) {
        return new PdxString((String) key);
      }
    } else if (key instanceof PdxString) {
      return key.toString();
    }
    return key;
  }
Converts Strings to PdxStrings and vice-versa based on the isIndexedPdxKeys flag

@return PdxString or String based on isIndexedPdxKeys flag
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java