Since this assertion for `mlFieldDataCardContent` is used in multiple places I think it would be good to have its own function with `fieldName` and `cardType` as the arguments. Same for `mlFieldDataCardDocCount` and `mlFieldDataCardCardinality`.