I still think `elsif` would be cleaner here than having to do `else` and then an inner `if`. But I guess it's your call.