This should be combined to an `else if` since there is no other branches in the inner if