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