Add condition for empty table