#1890 fixed a NullReferenceException when serializing a calculator that has not been assigned a formula