[fix] Avoid null result in case of undefined key

Fixes #4.