Fix two null errors in toJson of vm protocol objects (#699)

3 files changed