add constants and errors to code gen
handle null strings, by converting them into empty strings upon write.  so read -> write -> read of strings will convert null strings to empty ones but this seems an acceptable limitation