checking whether table is empty or not