This is redundant.  You can eliminate even setting `result` here, it's going to implicitly return from the `if`/`else` block.