 of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    z