CyBerAliEn - 6:31 pm on Apr 29, 2010 (gmt 0)
No problem! Even the best often have to perform this type of check to see what is going on.
If the value is coming from "outside" (ie: the user), it could explain why there is a space. A good idea is to generally always "trim()" user input. I have yet to find a reason/situation where I wouldn't want to... and it usually cleans things up nicely.
But certainly, you should trace the value up through your code to see how/why it is being introduced. Especially if it SHOULD NOT be there. (it indicates your code isn't doing what it should or something isn't coded properly, something that should be alarming)