Refactor NameExpression to use getValue instead of getLocalValue