Few lines above there is this line: ConditionCol52 cc = (ConditionCol52) col.getModelColumn();
So the instanceof always return true (assuming the 'cc' is not null). In case the 'cc' can be null, it needs to be checked explicitly and not hiding it in the instanceof check.