Support for type

@bifodus see my comment on line 16.  I think we could remove this and let regex handle it.