fix sorting crash on null entry