isListOfList function
Returns true if list elements are all of type List.
Implementation
bool isListOfList(Object? list) {
  if (list == null || list is! List) return false;
  if (list is List<List>) return true;
  if (list.isEmpty) return false;
  if (listNotMatchesAll(list, (e) => (e is List))) return false;
  return true;
}