private static boolean okToStoreOffHeap(Object v, AbstractRegionEntry e) {
    if (v == null) {
      return false;
    }
    if (Token.isInvalidOrRemoved(v)) {
      return false;
    }
    if (v == Token.NOT_AVAILABLE) {
      return false;
    }
    if (v instanceof DiskEntry.RecoveredEntry) {
      return false; // The disk layer has special logic that ends up storing the nested value in the
    }
    // RecoveredEntry off heap
    return e instanceof OffHeapRegionEntry;
    // TODO should we check for deltas here or is that a user error?
  }
@throws EntryNotFoundException if expectedOldValue is not null and is not equal to current
        value
geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java