Fixed so that an empty list does not crash the check of unique items.

I was not sure if I should create a new type of error for this situation or reuse the old. So to keep the PR as small as possible I reused the old error type. Anyhow, this PR fixes so the validator does not crash when checking unique items against an empty list. It should give a validation error and not crash the whole validator.