adding support for sorting nullable types