There is a convenience for that in the complier:

`hasLength(flattened, 1)`