fixed type check to by example 1