def METHOD_NAME(self, field_pos_list=None):
    if self.afi is None:
        if self.ip4 is not None:
            self.afi = 1
        elif self.ip6 is not None:
            self.afi = 2
    if self.has_ifindex and self.ifindex is None:
        warning('has_ifindex set but ifindex is not set.')
    if self.has_ipaddr and self.afi is None:
        warning('has_ipaddr set but afi is not set.')
    if self.has_ipaddr and self.ip4 is None and self.ip6 is None:
        warning('has_ipaddr set but ip4 or ip6 is not set.')
    if self.has_ifname and self.ifname is None:
        warning('has_ifname set but ifname is not set.')
    if self.has_mtu and self.mtu is None:
        warning('has_mtu set but mtu is not set.')
    return ICMPExtensionObject.METHOD_NAME(self, field_pos_list=field_pos_list)  # noqa: E501