Assert all vector elements have same type.