Previously, this caught all other cases not handled in the first two if/elifs and returned.  Now it only catches two specific scenarios.  Are there cases where this code would have returned before, but will not now?  Is that intended?