avoid attempt to insert nil object into dictionary
Merge pull request #379 from sononum/master

avoid attempt to insert nil object into dictionary