Fair enough. But it seems you just need to delete those two special cases (they're just performance optimizations). Leaving it in breaks the semantics of your function, and i'm not sure what it gets you.