Determines whether the specified address string is valid.

def valid_address(address):
    """
    Determines whether the specified address string is valid.
    """
    if not address:
        return False

    components = str(address).split(':')
    if len(components) > 2 or not valid_hostname(components[0]):
        return False

    if len(components) == 2 and not valid_port(components[1]):
        return False

    return True