check if error_report is set before attempting to send error emails