Corrected nonempty table checking for the table variable