added a trimValue support to get the trimmed value