Null reference checks to avert crash in listclassifier