@FalseOnNull
  public static boolean isValid(@Nullable CloseableReference<?> ref) {
    return ref != null && ref.isValid();
  }
Checks if the closable-reference is valid i.e. is not null, and is not closed.

@return true if the closeable reference is valid
fbcore/src/main/java/com/facebook/common/references/CloseableReference.java