code: public static <T> Collection<T> checkCollectionElementsNotNull(final Collection<T> value,
                                                                     final String valueName) {
          if (value == null) {
              throw new NullPointerException(valueName + " must not be null");
          }
  
          long ctr = 0;
          for (T elem : value) {
              if (elem == null) {
                  throw new NullPointerException(
                      String.format("%s[%d] must not be null", valueName, ctr));
              }
              ++ctr;
          }
  
          return value;
      }
docs: Ensures that the {@link Collection} is not {@code null}, and none of its elements are
  {@code null}.
  
  @param value a {@link Collection} of boxed objects
  @param valueName the name of the argument to use if the check fails
  
  @return the validated {@link Collection}
  
  @throws NullPointerException if the {@code value} or any of its elements were {@code null}