Using many brick functions, like ::setEmitter, ::setItem, ::setLight, ::setVehicle, etc, do require IDs, and I'm not sure why.But yeah nameToID or ::getID are what you're looking for.
Are you an alt?
20k id. Probably not.
So something like someFunction("YourDatablockName", YourDatablockName); would simplify to the first argument being a string containing the name of the datablock object and the second would be the datablock object ID.
That'd just call someFunction with "YourDatablockName" and YourDatablockName capitalized however it was the first time it was used. It doesn't matter though as an object name is a valid object ID ("foo".bar();) or even the start of an ID ("14264 foo".bar();).