Minor cleanups, and fix NPE when trying to print metadata artifact reports.