code: public static Object getFirstElement(Object maybeIterable) {
      if (!(maybeIterable instanceof Iterable<?>)) return null;
      Iterable<?> iterable = (Iterable<?>) maybeIterable;
      Iterator<?> iterator = iterable.iterator();
      return iterator.hasNext() ? iterator.next() : null;
    }
docs: Returns the first element, if any, of an object that may be an {@link Iterable}
  
  @param maybeIterable
  @return