If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.
Dynamo version
2.18.1
Revit version
2024
Operating system
Windows 11
What did you do?
Some nodes, such as List.FirstItem return a null if an empty list is supplied.
What did you expect to see?
Empty list
What did you see instead?
Null.
Other nodes, such as surface by patch, simply output an empty list if the input is an empty list. But List.FirstItem returns a null. This throws an error on the node. If the error is dismissed, it is not persistent and reappears when re-opening the script.
To design out the problem, I tried Function Apply, which returns a null, but at least there is no error. But the lacing doesn't work correctly. So if there is a list of list, and not an empty list, the wrong results will be returned. So it is not a suitable workaround.

Error.zip
If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.
Dynamo version
2.18.1
Revit version
2024
Operating system
Windows 11
What did you do?
Some nodes, such as List.FirstItem return a null if an empty list is supplied.
What did you expect to see?
Empty list
What did you see instead?
Null.
Other nodes, such as surface by patch, simply output an empty list if the input is an empty list. But List.FirstItem returns a null. This throws an error on the node. If the error is dismissed, it is not persistent and reappears when re-opening the script.
To design out the problem, I tried Function Apply, which returns a null, but at least there is no error. But the lacing doesn't work correctly. So if there is a list of list, and not an empty list, the wrong results will be returned. So it is not a suitable workaround.
Error.zip