code: public static <T> T getFirstOrNull(List<T> list) {
          if (list == null || list.isEmpty()) {
              return null;
          }
          return list.get(0);
      }
docs: Return the first element of list. If list is {@literal null} of empty,
  {@literal null} is returned.
  
  @param <T> Any type
  @param list The {@link List}
  @return list[0] or {@literal null} if list == null || list.isEmpty