title: How to check values of an attribute if it is present in json schema using karate framework
body: <p>I can have a response as:</p>
  
  <pre><code> { id: '123', name: 'foo' }` 
  </code></pre>
  
  <p>if the user has not a dog</p>
  
  <p>OR </p>
  
  <pre><code>{ id: '123', name: 'foo', dog: {id: '123', color: 'brown'} }`
  </code></pre>
  
  <p>if the user has a dog.</p>
  
  <p>In my feature I have:</p>
  
  <pre><code>* def schema = { id: '#string', name: '#string', dog: {id: '#string', color: '#string'} }`
  * match response == schema
  </code></pre>
  
  <p>The prb is that if I have a user without dog in response, I have this error:</p>
  
  <pre><code>path: $[0].dog, actual: null, expected: {id=#string, label=#string}, reason: actual value is null
  </code></pre>
  
  <p>How can I check the attribute 'dog' in my schema?
  Thanks</p>