Can you refactor this into a helper method? It'd be nice to avoid re-doing the branch, and this way you can just call it inside this branch and above in the case statement.