Returns whether all the resources in the collection are matching the given media type.
bool allMatchMediaType(MediaType mediaType) => isNotEmpty && every((it) => mediaType.matches(it.mediaType));