However, it's a classic case of programming to the corner case (or the worst-case scenario).
Any time we make a corner case into an error we need to carefully specify exactly what the error case is so that we can implement it correctly and test it confidently.