def exclude_lan_ips(local_ip):
    """
    Given a candidate that may be a Public IP address, check that it is not
    a LAN IP address.  If it is not a LAN IP address, return the input
    unchanged.  Otherwise return None.

    Parameters
    ----------
    local_ip : unicode or None

    Returns
    -------
    local_ip : unicode or None
    """
    if isinstance(local_ip, bytes):
        local_ip = local_ip.decode('utf-8')
    if local_ip is None:
        pass
    elif local_ip.startswith('192.168.'):
        local_ip = None
    elif local_ip in ['10.0.0.0', '8.8.8.8']:
        local_ip = None
    else:
        pass
    return local_ip
