code: public static boolean sizeIs(final List<?> list, final int size) {
          if (size == 0) {
              return list == null || list.isEmpty();
          } else {
              return list != null && list.size() == size;
          }
      }
docs: Checks whether the list has the given size. A null list is treated like a list without
  entries.
  
  @param list The list to check
  @param size The size to check
  @return true when the list has the given size or when size = 0 and the list is null, false
  otherwise