Argument type validation with user-friendly error messages

Perhaps `set` should also be included here?