Improved functions: getStringValue() and getNumericValue()