prevent error when sorting by a column with unset option text

if you try to sort by a column that has an unset option it returns an error 'cant read property text of undefined'