Prevent type === undefined
Made registrymatch configurable