Prevent encode_variant
doing memcpy
from nullptr
#84155
Merged
encode_variant
doing memcpy
from nullptr
#84155