public static @NotNull <T> T cacheOrGet(@NotNull AtomicReference<T> ref, @NotNull T defaultValue) {
    T value = ref.get();
    if (value != null) return value;
    return ref.updateAndGet(prev -> prev == null ? defaultValue : prev);
  }
public static @NotNull <T> T cacheOrGet(@NotNull AtomicReference<T> ref, @NotNull T defaultValue)