def is_valid(line):
    """
    Checks if the content of an edge has a valid format.
    <vertex vertex weight>

    :param line: A line of the input text.
    :type: String
    :return: A list if edge is valid, None otherwise.
    """
    edge = line.rsplit()
    wrong_args_number = len(edge) != 3
    is_comment = line.startswith("#")

    if wrong_args_number or not edge or is_comment:
        return None
    try:
        int(edge[0])
        int(edge[1])
        int(edge[2])
    except ValueError:
        return None
    return edge