def longest_line_length(file_name):
    """
    This function takes a string file_name and
    returns the length of the longest line in the file.
    """
    with open(file_name) as file:
        lines = file.readlines()
        length = 0
        for line in lines:
            if len(line) > length:
                length = len(line)
    if length == 0:
        return None
    else:
        return length