code: public static <T> List<T> nullToEmptyList(Collection<T> newValue) {
      if (newValue == null) {
        return new ArrayList<>();
      }
      return new ArrayList<>(newValue);
    }
docs: Returns an empty list if the newValue is null
  
  @param newValue - a list
  @param <T>      - any type
  @return non-null list