check if local variable exists, if so return it else try to return value.varname