diff --git a/test/Libraries/SystemTestServices/SystemTestBase.cs b/test/Libraries/SystemTestServices/SystemTestBase.cs
index 9b0bf11e559..24390bbf9e9 100644
--- a/test/Libraries/SystemTestServices/SystemTestBase.cs
+++ b/test/Libraries/SystemTestServices/SystemTestBase.cs
@@ -307,7 +307,7 @@ public void AssertPreviewCount(string guid, int count)
}
///
- /// Returns the NodeModel corresponding to the input guid as type T
+ /// Returns the NodeModel corresponding to the input guid
///
/// A NodeModel (or derived) type
/// The node Guid
@@ -316,7 +316,9 @@ public void AssertPreviewCount(string guid, int count)
[Obsolete("This method will be removed in a future version of Dynamo")]
public NodeModel GetNode(string guid) where T : class
{
- if (typeof(T) == typeof(NodeModel) || typeof(T).IsSubclassOf(typeof(NodeModel)))
+ bool isNodeModel = typeof(T) == typeof(NodeModel);
+ bool isDerivedFromNodeModel = typeof(T).IsSubclassOf(typeof(NodeModel));
+ if ( !isNodeModel && !isDerivedFromNodeModel)
{
throw new Exception($"{typeof(T)} is not of type NodeModel");
}