 getPhoneNumber = (data) ->
     listPhones = []
 
-    data.phone_numbers.forEach (number) ->
+    data.phone_numbers?.forEach (number) ->
         listPhones.push
             name: 'tel'
             type: number.type.toLowerCase()

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

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


getUrls = (data) ->
    listUrls = []

    data.sites?.forEach (site) ->
        listUrls.push
            name: 'url'
            value: site.url
            type: site.name
    data.profiles?.forEach (profile) ->
        listUrls.push
            name: 'url'
            value: profile.url
            type: 'linkedin'
    data.twitte?r.forEach (twitter) ->
        listUrls.push
            name: 'url'
            value: twitter.url
