private static bool IsEmptyNode(ITypedElement node) { EnsureArg.IsNotNull(node); // A node is considered empty when it has no children and its value is null return(!node.Children().Any() && node.Value == null && !node.IsFhirResource()); }