attribute table: NULL values are considered less than other values (fixes #6715)