Reject empty strings and trim whitespace characters