Add option for trimming whitespace in getValue