verify obj exists before checking keys