hotfix exit with error if nextPermutation called on non-iterable