Is it possible to move this check into iterableTypeFromRank so that its logic doesn't diverge?