fixed typeCheck and added information on put Error