fixed null pointer issue in assign collection to a class API
Merge pull request #543 from skpcharles/master

fixed null pointer issue in assign collection to a class API