MDL-47322 Availability: empty availability should be saved as null

As part of the unit test modifications for this change, I added the get_json
function to the availability conditions that didn't have it. (This is a function
for use in unit tests.)