Added generic collection matching to support better validation.