I don't think the else is necessary. It will return nil if none of the when's evaluate.