too much nesting, i.e., too much { { { {
To make code cleaner, do something like this:

return nil if a.nil? and b.nil?
return ContentData.new(a) if b.nil?
return ContentData.new(b) if a.nil?

# Assuming a and b are not nil....
some code here...