value_for_key_as_uint16 should return a uint16_t, not a uint32_t
The ip_version in the metadata is a uint16_t in the spec