I really despise when leading and trailing whitespace creeps into my database 
Many times I am copy/pasting data from other sources/documents/websites (even the NPM website) like IP addresses or host names and I find that there are may times where a stray space (or tab, etc) character will be at the beginning or end of my search string and I don't notice it until I run the query and get back 0 results.
Solution: trim all white space characters when the user hits the submit/query button. These characters shouldn't be valid for device/IP names anyway.
Bonus points: Disallow even entering these as device Labels on node names (I believe it still accepts it), because occasionally that happens too and I don't know of a case where anyone would want " myhostname123" as a label or description.
Double Bonus Points: Don't even let them in for Custom Fields or the data in Custom fields.