json and null values
<p>On the server, I serialize my objects and sometimes, some properties are null. On the page, when I parse the string, the null properties are deserialized correctly and in my javascript, I test to see if the properties for which there might be a null are indeed null or not before working with them; like this:</p>

<pre><code>if (TheObject.TheProp &amp;&amp; TheObject.TheProp.length) {...}
</code></pre>

<p>It doesn't crash and it works. My question is this: should I, on the server, populate every property with something (ie. "" for strings and 0 for numbers) because it's considered good practice or is it ok to have null properties on the page?</p>

<p>Thanks for your suggestions.</p>
