By handling this situation first of all, you can reduce code complexity, see comment above.