public static <T> T firstElementOrNull( final Iterable<T> iterable )
    {
        if ( iterable == null ) {
            return null;
        }
        final Iterator<T> iterator = iterable.iterator();
        if ( iterator.hasNext() ) {
            return iterator.next();
        } else {
            return null;
        }
    }