title: jq returning null as string if the json is empty
body: <p>I'm running this command do get a value from the json;</p>
  
  <p><code>addr=$(./xuez-cli getnetworkinfo | jq -r '.localaddresses[0].address')</code></p>
  
  <p>and it works just fine.</p>
  
  <p>BUT if this <code>.localaddresses[0].address</code> part empty or doesn't even exist, jq sets the <code>addr</code> variable as <code>null</code> like this; <code>addr=null</code></p>
  
  <p>and I want to check if the json is empty/null and run some other command instead of parsing it as <code>null</code> string.</p>
  
  <p>I couldn't find a way to work this around. How can I do this?</p>