 getEmails = (data) ->
     listEmails = []
 
-    data.emails_extended.forEach (email) ->
+    data.emails_extended?.forEach (email) ->
         listEmails.push
             name: 'email'
             value: email.email

        #region = segmentAddress[1] || ''
        #locality = segmentAddress[2] || ''

    data.addresses.forEach (address) =>
        addressArray = ContactHelper.adrStringToArray address.raw
        addressArray[6] = country


getPhoneNumber = (data) ->
    listPhones = []

    data.phone_numbers?.forEach (number) ->
        listPhones.push
            name: 'tel'
            type: number.type.toLowerCase()
