fixed the debug message when the table is NULL.