Try to handle leading and trailing whitespace