I'm wary of `bin` being passed in when it's looking for `bin.metadata.name` - if the value isn't there it'll break. You can include `undefSafe` to pick out the value, but what would be cleaner is to pass the name value in directly - that way you're being explicit about what you actually need in the function (same also goes for the sqlite version).