Tests $x for iterator and non-iterator types.