can getSegments return the empty sequence instead of us having to null check whenever we use the fn?