Extract logic to detect blank tab