This should probably be conditioned on the author's name being defined:
```ruby
xml['dc'].creator data['author']['name'] unless data['author'].nil? or data['author']['name'].nil?
```