Was using uninitialized ID name, leading to unknown ID type. Thanks at Ray molenkamp (@LazyDodo) for noting the issue.