def get_list_sub_key_string(index, key_string):
    """
    Helper function to add the given index to preceding keys.
    Handles the case, if key is the first key and key_string is None.

    :param index: The index to add to the key_string
    :param key_string: The string containing the preceding keys
    :return: A string concatenation of key_string and index
    """
    if key_string is None:
        sub_key_string = '[{}]'.format(index)
    else:
        sub_key_string = '{}[{}]'.format(key_string, index)
    return sub_key_string
