DObject now includes an error code so that errors can be tracked with return values from functions
Now getDataAs can be called to auto cast the data to a particular type