Adds trim function on key and value