check comparator for null ptr