def append_key_value(content, key, value):
    """
    Safely append the key/value as a separate line to the content
    :param content:
    :param key:
    :param value:
    :return: new content
    """
    if key and value:
        if content:
            return '%s\n%s: %s' % (content, key, value)
        return '%s: %s' % (key, value)
    return content