Dont write attributes that are nil or default