Refactored checking for rows in the list table.