[fix] Avoid null result in case of undefined key

Fixes #4.
Merge pull request #5 from domachine/fix/undefined-key-issue

[fix] Avoid null result in case of undefined key