import socket


def is_ip(ip_address):
    """
    Check if an valid IP address using socket.inet_pton.

    Args:
       ip_address: a string to check

    Returns:
       bool: True if an IP address, False if not.
    """
    if isinstance(ip_address, int):
        return False
    elif "." in ip_address:
        family = socket.AF_INET
    elif ":" in ip_address:
        family = socket.AF_INET6
    else:
        return False

    try:
        socket.inet_pton(family, ip_address)
    except socket.error:
        return False
    else:
        return True