I would tell a user what the actual type was:

    throw new IllegalArgumentException("...: " + data.getClass().getSimpleName());