Removed useless Param "type" variable, added precise type check for Arrays and Matrices.