Slicer crash without Error message when calling vtkMRMLSequenceNode.GetNthDataNode(-1)

Operating system: Win10
Slicer version: 5.1.0-2022-08-16
Expected behavior: Generate an Error message, instead of crashing without any warning or error
Actual behavior: Crash directly with no error message

This happens when the input argument of function .GetNthDataNode( int itemNumber < 0 ).
The crashing without a hint gives the programmer a hard time debugging.