improved method for determining if a line box is empty