Is there a way to unest the `if` statement here?