Make sure that AnyValueSerializer only serializes AnyValue.