code: public static <T> T[] notNullElements(T[] array, String name) {
          notEmpty(Arrays.asList(array), name);
          for (T ele : array) {
              notNull(ele, String.format("Collection %s element %s", name, ele));
          }
          return array;
      }
docs: Check that a list is not null and that none of its elements is null. If null or if the list has emtpy elements
  throws an IllegalArgumentException.
  @param array the array of T.
  @param name parameter name for the exception message.