List of users to list of userIds.
static List<String>? toIds(List<User>? users) => users?.map((u) => u.id).toList();