Trim whitespace from inputs.