Resolve error "Creating default object from empty value"