Fixed potential set nil object to dictionary

Signed-off-by: Vincent Fournié <vincent.fournie@epyx.ch>
Merge pull request #1 from epyx-src/fix/set-nil-to-dictionary

Fix/set nil to dictionary