Fix handling of undefined
Merge pull request #16 from sdepold/hotfix/undefined

Fix handling of undefined