logEvents: Be more robust towards different types of objects being sent in as errors.
Trim hrefs before they are checked for hrefType. Avoids treating hrefs with an accidental leading space as relative