Trim whitespaces from user inputs