Check for None in replaces and replaced_by
Check for None in replaces and replaced_by

Since these are just datastore keys they could have the value 0. Check
for None explicitly.

zaneb/heat-convergence-prototype