added isEmpty assert to check for empty table