private PdxString getPdxStringFromObjectField(PdxField ft) {
    if (ft.getFieldType() == FieldType.OBJECT) {
      ByteSource buffer = dis.getBuffer();
      byte[] bytes = null;
      if (buffer.hasArray()) {
        bytes = buffer.array();
      } else {
        throw new IllegalStateException();
      }
      int offset = getPositionForField(ft) + buffer.arrayOffset();
      // Do not create PdxString if the field is NULL
      if (bytes[offset] == DSCODE.STRING.toByte() || bytes[offset] == DSCODE.STRING_BYTES.toByte()
          || bytes[offset] == DSCODE.HUGE_STRING.toByte()
          || bytes[offset] == DSCODE.HUGE_STRING_BYTES.toByte()) {
        return new PdxString(bytes, offset);
      }
    }
    return null;
  }
This method checks whether Object field is String type. If its String then it returns PdxString
otherwise null.
geode-core/src/main/java/org/apache/geode/pdx/internal/PdxReaderImpl.java