Strip leading and trailing whitespaces

Numbers are not recognized as numbers, when there are leading and trailing whitespace characters.
Added 2 lines to strip them from items being compared.