Handle empty list of cost types correctly

Returning 'undefined' will cause the the core to show an empty work
package property.