Use guards instead of conditional expression