def isMAC(addr):
    '''Return a MAC instance for a valid MAC address, None otherwise.
    '''
    try:
        return MAC(addr)
    except (TypeError, ValueError):
        return None
Return a MAC instance for a valid MAC address, None otherwise.
    
recipes/Python/577191_IP_and_MAC_addresses/recipe-577191.py