def get_result_value(result):
    """
    Retrieve the result value from a result object, but make sure we either return the only value set
    or an empty string if the object is not what we expect.
    :param result:
    :return:
    """
    value = result.get("value")
    if value is None:
        return ""
    choices = value.get("choices")
    if choices is None:
        return ""
    if len(choices) == 0:
        return ""
    return choices[0]