Added test cases for defect #1. Nullpointer exception when getting empty (null) collection elements from generated code