More generic iterable checking.