You can create a function that you pass in the row and date to compare, the function returns true or false.
function compareDates(date1, date2) {
if(date1 === null || date2 === null) {
return false;
}
return date1 > date2;
}
You then just use your ng-if calling the function:
<div ng-if="compareDates(this.dateToCompare, row.CreateDate)