fix #6244: add removeNullValues in updateSortindex method to avoid exception when collection contains null values
fix #6244: add removeNullValues in updateSortindex method to avoid exception when collection contains null values