This is not allowed, you need to change `AttributeValue::setAttribute()` to accept `null`.