verify obj exists before checking keys
Merge pull request #17 from zenhob/objkeys_fix

verify obj exists before checking keys