Fix potential npe in reports servlet.