code: @SuppressWarnings("unchecked")
      @NonNull
      public static <T> Set<T> unmodifiableNonNullSet(@Nullable Set<T> set) {
          return set == null || set.isEmpty()
                  ? (Set<T>) emptySet()
                  : Collections.unmodifiableSet(set);
      }
docs: Converts set of something to unmodifiable non-null set.
  
  @param set set to convert, can be {@code null}.
  @return non-null, unmodifiable set of something.