an improved idiom for likely_matrix_type