Switch from String to Text and strip trailing whitespace