Fix validateUnique emitting errors when non-scalar data is received.
While normally the IsUnique() rule can expect sane data as it will have
already been validated, that is not true when the rule is used inside
a validator function. This prevents non-scalar data from getting to the
rule by failing early.
Refs #9088