Allows for user update when username is optional

When the username is optional, the `validateIsUnique` method wouldn't pass because the `$identity` array was never empty. This ensures it's cleared of all empty values before validating, and then checks empty array.