This isn't very optimal currently in terms of object creation. A new instance is created for every empty condition. Internally collections are created and wrapped automatically without checking for empty input. Combining class and method level mappings repeats the process further.