Could do `switch(x$type, reactive = x$dr$id, constant = as.character(x$value), variable = deparse(x$value))`