code: public static <T> Iterable<T> nullSafeIterable(T[] iterable) {
          return (iterable != null) ? Arrays.asList(iterable) : Collections.EMPTY_LIST;
      }
docs: Useful for avoiding NPEs when using for-each on a iterable that may be null.
  
  @return the given iterable, if not null, otherwise an empty list.