Use idiomatic `maybe` method instead of case