added tests; handled null cases for marshalling and unmarshalling
2 files changed