You could technically do this with a ternary operator, rather than having the else statement. It's really a matter of preference & readability, though.