Proper result data types for built-in functions
Refined input value preparation