Fix attribute validation

| Q                    | A
| -------------------- | ---
| Bug fix?             | Yes
| New feature?         | No
| BC breaks?           | No
| CI currently passes? | No
| Tests pass?          | Yes
| Scenarios pass?      | Yes
| Checkstyle issues?   | No
| Changelog updated?   | Yes
| Fixed tickets        | N.A.
| Doc PR               | N.A.
ouch, `isset` is working just because value is an empty string. If value was `null`, it would always be `false`.
Better use `array_key_exists` to avoid error.

More generally, I'm wondering why so many aspects are validated inside this same validator.
For example, why do we check that code is `!== null` and is a string?
Wouldn't it be better to put a NotBlank and Type('string') constraints on the code property?

In the end, I would only check code uniqueness here and would ignore option codes that are null or not string.