I think we can probably simplify this a bit.  Since the `givenName` and `familyName` properties are basically independent, you can check them individually and push to the `filename` list.  We can also break out the common code into a function.  Maybe something like:

```javascript
// Utility function defined somewhere else in the file
function maybeAddToList(contact, prop, list) {
  if (contact[prop] && contact[prop].length > 0) {
    list.push(contact[prop][0]);
  }
}

// build the filename array using the utility function
maybeAddToList(contact, 'givenName', filename);
maybeAddToList(contact, 'familyName', filename);
```