handle NestedNullException while creating csv

this prevenets tracebacks in cases where the element is missing entirely (e.g. package profile comparison) and thus element attributes are inaccessible
add csv export for package profile comparison