Wouldn't it be better to do a `split(':')` on the name to get the type? We can also just check for `indexOf('.')` instead of needing match.