code: public static <T> T getFirst(Iterable<T> iterable)
      {
          if (iterable instanceof RichIterable)
          {
              return ((RichIterable<T>) iterable).getFirst();
          }
          if (iterable instanceof List)
          {
              return ListIterate.getFirst((List<T>) iterable);
          }
          if (iterable instanceof SortedSet && !((SortedSet<T>) iterable).isEmpty())
          {
              return ((SortedSet<T>) iterable).first();
          }
          if (iterable instanceof Collection)
          {
              return Iterate.isEmpty(iterable) ? null : iterable.iterator().next();
          }
          if (iterable != null)
          {
              return IterableIterate.getFirst(iterable);
          }
          throw new IllegalArgumentException("Cannot get first from null");
      }
docs: Returns the first element of a collection.  In the case of a List it is the element at the first index.  In the
  case of any other Collection, it is the first element that would be returned during an iteration. If the
  Collection is empty, the result is {@code null}.
  <p>
  WARNING!!! The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so
  if you use this method, the first element could be any element from the Set.
  
  @throws IllegalArgumentException if the Collection is null