Correctly test for null argument in WriteReports