Sets friendlier error message on wrong box type