stream type checking

will add vector and matrix in part 2