def isvalidIp(ip_addr):
    """Check if valid IPv4 address"""
    try:
        subnets = list(map(int, ip_addr.split('.')))
        return len(subnets) == 4 and all(map(lambda x: 0 <= x <= 255, subnets))
    except ValueError:
        return False