Now works with nested objects
Added negative test for nested objects