code: public static <E> E firstInList(List<E> list){
      	if (list == null || list.size() == 0){
      		return null;
      	}else{
      		return list.get(0);
      	}
      }
docs: Get the first element in the list
  @param list
  @return  null if the list is null or is empty, otherwise the first element of the list