Compare again database NULL in set_conditional_value function
e.g.
// display a blank value when it's null.
$dg -> set_conditional_value( "SORT", "===null", array( "TCellValue"=>"" ) );
$dg -> set_conditional_value( "SORT", "===null", array( "TCellValue"=>"" ) );