Reworked predicate checking and composing, to allow for mixed iterator and value_type checks.