A comment to the effect that this is guarding against whitespace would be nice here. Took more than one read for me to understand why it was like this.