Fix #161: undefined or null string sort bug.