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

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