Fixing sorting on columns with html data

Fixing Uncaught TypeError: Cannot call method 'replace' of null  when trying to sort a column that contains HTML data.