Updated getValueString to accept string