change isvector to use duck typing