Implemented error handling for XBlock instances
Added support for json-encoded strings for Dict field