code: @NullSafe
    public static <T> Collection<T> nullSafeCollection(Collection<T> collection) {
      return collection != null ? collection : Collections.emptyList();
    }
docs: Null-safe method returning the given {@link Collection} if not {@literal null} or an empty {@link Collection}
  if {@literal null}.
  
  @param <T> {@link Class} type of the elements in the {@link Collection}.
  @param collection {@link Collection} to evaluate.
  @return the given {@link Collection} if not {@literal null} or an empty {@link Collection} if {@literal null}.
  @see java.util.Collection