fixed bug creating null exceptions in Unique validations