some kind of `firstNonEmpty` abstraction might be nice here, I have seen this in a couple of other places and it always look unwieldy