add hasKey to see if object has key path like 'foo.bar.baz'