What about the other cases? You should as least give a warning to the user (using a logger). Here you cover just two cases:

1. The type is invalid
1. The type is vectorial

What about when the type is valid but not vectorial?