wouldn't it be safer if we check for 

Array.isArray(contact.givenName) && contact.givenName[0] && contact.givenName[0].trim()