Merge pull request #9170 from jmcanterafonseca/fix_trim

Bug 861707 - TypeError: contact.givenName[0].trim is not a function(cherry picked from commit 5169151672faa4040a4ad815667a519d8e631f07)
(cherry picked from commit 39416748d3ff5a9fc8127b141c5ea820249e12c6)