Jeśli DataTable to NULL JS

var table = $('#idTable').DataTable();

if ( ! table.data().any() ) {
    alert( 'Empty table' );
}
Crowded Cobra