public static Object getHeapForm(Object o) {
    if (o instanceof StoredObject) {
      return ((StoredObject) o).getValueAsDeserializedHeapObject();
    } else {
      return o;
    }
  }
If o is off-heap then return its heap form; otherwise return o since it is already on the heap.
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapHelper.java