fixed an undefined index bug in unique validation on object creation