fixed type check of array