verify obj exists before checking keys

I needed to make these changes to get meatgame working for me without errors.