Check for duplicate and null attributes in Model Editor API CreateNode (#28758)
### Description
<!-- Describe your changes. -->
Add check for misuse.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Address invalid input gap.