{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5489","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5489/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5489/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5489/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/5489","id":93849842,"number":5489,"title":"Layouts | Adding a Media Library Picker field blows up Layouts","user":{"login":"jagraz","id":12205163,"avatar_url":"https://avatars.githubusercontent.com/u/12205163?v=3","gravatar_id":"","url":"https://api.github.com/users/jagraz","html_url":"https://github.com/jagraz","followers_url":"https://api.github.com/users/jagraz/followers","following_url":"https://api.github.com/users/jagraz/following{/other_user}","gists_url":"https://api.github.com/users/jagraz/gists{/gist_id}","starred_url":"https://api.github.com/users/jagraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagraz/subscriptions","organizations_url":"https://api.github.com/users/jagraz/orgs","repos_url":"https://api.github.com/users/jagraz/repos","events_url":"https://api.github.com/users/jagraz/events{/privacy}","received_events_url":"https://api.github.com/users/jagraz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OrchardCMS/Orchard/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/OrchardCMS/Orchard/labels/Layouts","name":"Layouts","color":"ededed"},{"url":"https://api.github.com/repos/OrchardCMS/Orchard/labels/Media","name":"Media","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"sfmskywalker","id":938393,"avatar_url":"https://avatars.githubusercontent.com/u/938393?v=3","gravatar_id":"","url":"https://api.github.com/users/sfmskywalker","html_url":"https://github.com/sfmskywalker","followers_url":"https://api.github.com/users/sfmskywalker/followers","following_url":"https://api.github.com/users/sfmskywalker/following{/other_user}","gists_url":"https://api.github.com/users/sfmskywalker/gists{/gist_id}","starred_url":"https://api.github.com/users/sfmskywalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfmskywalker/subscriptions","organizations_url":"https://api.github.com/users/sfmskywalker/orgs","repos_url":"https://api.github.com/users/sfmskywalker/repos","events_url":"https://api.github.com/users/sfmskywalker/events{/privacy}","received_events_url":"https://api.github.com/users/sfmskywalker/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/22","html_url":"https://github.com/OrchardCMS/Orchard/milestones/Orchard%201.9.x","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/22/labels","id":1065780,"number":22,"title":"Orchard 1.9.x","description":"Planned release","creator":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"open_issues":389,"closed_issues":15,"state":"open","created_at":"2015-04-13T19:41:13Z","updated_at":"2015-07-08T20:50:26Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-08T17:49:24Z","updated_at":"2015-07-08T21:41:46Z","closed_at":null,"body":"*** Repro Steps ***\r\n\r\n1) create a new content type\r\n2) add a media library picker field to it\r\n3) create a new content of the content type\r\n\r\n*** Desired results ***\r\nLayout part content saves; can be edited\r\n\r\n*** Actual Results ***\r\nPage reloads; layout stage is empty. \r\n\r\n\r\nThis also happens if you add the media library picker field to the content type after creating a layout. \r\n\r\nI get this error in the logs:\r\n\r\n2015-07-08 10:27:37,799 [23] Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator - Default - TargetInvocationException thrown from IContentPartDriver by Orchard.Layouts.Drivers.LayoutPartDriver\r\n http://orchard19.local.onestop.com/Admin/Contents/Create/attorney\r\nSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at Orchard.MediaLibrary.Fields.MediaLibraryPickerField.get_MediaParts()\r\n   at ASP._Page_Modules_Orchard_MediaLibrary_Views_Fields_MediaLibraryPicker_Summary_cshtml.Execute() in c:\\Onestop.GIT\\Orchard19\\src\\Orchard.Web\\Modules\\Orchard.MediaLibrary\\Views\\Fields\\MediaLibraryPicker.Summary.cshtml:line 8\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 151\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.<>c__DisplayClass26.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 133\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:line 56\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 203\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 99\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 86\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 44\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 29\r\n   at CallSite.Target(Closure , CallSite , Object , Object )\r\n   at Orchard.Core.Shapes.CoreShapes.ContentZone(Object Display, Object Shape, TextWriter Output) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard.Web\\Core\\Shapes\\CoreShapes.cs:line 286\r\n   --- End of inner exception stack trace ---\r\n   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:line 64\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.<>c__DisplayClass4.<CreateDelegate>b__3(DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:line 55\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:line 56\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 203\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 99\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 86\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 44\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 29\r\n   at CallSite.Target(Closure , CallSite , Object , Object )\r\n   at ASP._Page_Modules_Orchard_Layouts_Views_ContentField_cshtml.Execute() in c:\\Onestop.GIT\\Orchard19\\src\\Orchard.Web\\Modules\\Orchard.Layouts\\Views\\ContentField.cshtml:line 8\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 151\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.<>c__DisplayClass26.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 133\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:line 56\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 203\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 99\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 86\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 44\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 29\r\n   at CallSite.Target(Closure , CallSite , Object , Object )\r\n   at ASP._Page_Modules_Orchard_Layouts_Views_Elements_ContentField_Design_cshtml.Execute() in c:\\Onestop.GIT\\Orchard19\\src\\Orchard.Web\\Modules\\Orchard.Layouts\\Views\\Elements\\ContentField.Design.cshtml:line 1\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.RenderRazorViewToString(String path, DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 174\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 157\r\n   at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.<>c__DisplayClass26.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:line 133\r\n   at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:line 56\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 203\r\n   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:line 99\r\n   at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:line 86\r\n   at Orchard.DisplayManagement.ShapeDisplay.Display(Object shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\ShapeDisplay.cs:line 33\r\n   at Orchard.DisplayManagement.ShapeDisplay.Display(Shape shape) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\DisplayManagement\\ShapeDisplay.cs:line 20\r\n   at Orchard.Layouts.Services.LayoutEditorFactory.RenderElement(Element element, DescribeElementsContext describeContext, String displayType)\r\n   at Orchard.Layouts.Services.LayoutEditorFactory.<>c__DisplayClassa.<GetConfigurationData>b__9(ElementDescriptor descriptor)\r\n   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)\r\n   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)\r\n   at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer)\r\n   at Orchard.Layouts.Services.LayoutEditorFactory.GetConfigurationData(IContent content)\r\n   at Orchard.Layouts.Services.LayoutEditorFactory.Create(String layoutData, String sessionKey, Nullable`1 templateId, IContent content)\r\n   at Orchard.Layouts.Services.LayoutEditorFactory.Create(LayoutPart layoutPart)\r\n   at Orchard.Layouts.Drivers.LayoutPartDriver.<>c__DisplayClass14.<Editor>b__13()\r\n   at Orchard.ContentManagement.Drivers.ContentPartDriver`1.<>c__DisplayClass1b.<ContentShape>b__1a(BuildShapeContext ctx) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\ContentManagement\\Drivers\\ContentPartDriver.cs:line 217\r\n   at Orchard.ContentManagement.Drivers.ContentPartDriver`1.<>c__DisplayClass21.<ContentShapeImplementation>b__20(BuildShapeContext ctx) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\ContentManagement\\Drivers\\ContentPartDriver.cs:line 226\r\n   at Orchard.ContentManagement.Drivers.ContentShapeResult.ApplyImplementation(BuildShapeContext context, String displayType) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\ContentManagement\\Drivers\\ContentShapeResult.cs:line 45\r\n   at Orchard.ContentManagement.Drivers.ContentShapeResult.Apply(BuildEditorContext context) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\ContentManagement\\Drivers\\ContentShapeResult.cs:line 25\r\n   at Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator.<>c__DisplayClass10.<UpdateEditor>b__f(IContentPartDriver driver) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\ContentManagement\\Drivers\\Coordinators\\ContentPartDriverCoordinator.cs:line 65\r\n   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\\Onestop.GIT\\Orchard19\\src\\Orchard\\InvokeExtensions.cs:line 17\r\n"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/119739735","html_url":"https://github.com/OrchardCMS/Orchard/issues/5489#issuecomment-119739735","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5489","id":119739735,"user":{"login":"sfmskywalker","id":938393,"avatar_url":"https://avatars.githubusercontent.com/u/938393?v=3","gravatar_id":"","url":"https://api.github.com/users/sfmskywalker","html_url":"https://github.com/sfmskywalker","followers_url":"https://api.github.com/users/sfmskywalker/followers","following_url":"https://api.github.com/users/sfmskywalker/following{/other_user}","gists_url":"https://api.github.com/users/sfmskywalker/gists{/gist_id}","starred_url":"https://api.github.com/users/sfmskywalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfmskywalker/subscriptions","organizations_url":"https://api.github.com/users/sfmskywalker/orgs","repos_url":"https://api.github.com/users/sfmskywalker/repos","events_url":"https://api.github.com/users/sfmskywalker/events{/privacy}","received_events_url":"https://api.github.com/users/sfmskywalker/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T21:41:46Z","updated_at":"2015-07-08T21:41:46Z","body":"I decided to go with the simplest solution, because even if I refactored `Lazy<T>` with `LazyField<T>`, the value of the lazy field would still return null, so I'd have to return an empty collection anyway, so might as well check for null against the internal lazy field like so:\r\n\r\n```C#\r\npublic IEnumerable<MediaPart> MediaParts { \r\n    get {\r\n        return _contentItems != null ? _contentItems.Value : Enumerable.Empty<MediaPart>();\r\n    }\r\n}\r\n```"}}