Fixing null pointer exception in reports.