src/main/java/com/github/mjeanroy/springmvc/view/mustache/commons/PreConditions.java
public static <T> Collection<T> notEmpty(Collection<T> array, String message) {
		if (array == null || array.size() == 0) {
			throw new IllegalArgumentException(message);
		}
		return array;
	}
public static <T> Collection<T> notEmpty(Collection<T> array, String message) {
		if (array == null || array.size() == 0) {
			throw new IllegalArgumentException(message);
		}
		return array;
	}
Check if a collection is not null and not empty.
If collection is null or empty, an {@link java.lang.IllegalArgumentException} is thrown.
If collection is not null and not empty, it will be automatically returned.

@param array Collection to check.
@param message Exception message.
@param <T> Type of array elements.
@return Original collection.