added support for direct serialization of built-in primitive types, strings and null objects on root level