[SQL] Handle null values in debug()