isEmpty method for table