Could this be combined with the previous `if` into and `else if`?