logEvents: Be more robust towards different types of objects being sent in as errors.