I thought about that, but I don't like that kind of "performance optimization" for corner cases in this kind of function (since they're almost never performance critical).