/// <summary> /// Validate the field passed in /// </summary> /// <param name="document"></param> /// <param name="node"></param> /// <param name="useRelative"></param> private static HtmlNode ValidateDefaults(HtmlDocument document, HtmlNode node, bool useRelative) { document = document.NotNull(); if (useRelative) { node = node.NotNull(); } return useRelative ? node : document.DocumentNode; }