def get_ethertype_value(ethertype):
    """Convert string representation of ethertype to the numerical."""
    if ethertype is None:
        return None
    mapping = {
        'ipv4': 0x0800,
        'ipv6': 0x86DD,
        'arp': 0x806
    }
    return mapping.get(ethertype.lower())