Ah, neat. (Maybe worth a comment that explains this & refers to the `.is_empty` method, so a beginner reading the file is made aware of the reason for the slightly peculiar test.)