fix the emptiness checker