In the aftermath of Donald Trump’s speech on illegal immigration, many fact-checkers and commentators claimed that Trump’s concerns about criminal activities and welfare dependency by illegal immigrants were utterly unfounded. Here, for example, was the always-excellent Jason Riley of The Wall Street Journal:

Riley’s words reflect the common wisdom in the punditocracy. According to Pew Research, “The crime rate among first-generation immigrants – those who came to this country from somewhere else – is significantly lower than the overall crime rate and that of the second generation.”

But it may not be quite so simple.

David Frum of The Atlantic, no hard-core immigration opponent, wrote in 2015 that as of 2011, there were 25,000 illegal immigrants serving murder sentences, and nearly 3 million offenses committed by illegal immigrants between 2003 and 2009, including 70,000 sex crimes and hundreds of thousands of other violent crimes. “After years of welcome decline,” Frum pointed out, “crime rates are rising in immigration hubs including Houston, Milwaukee, Phoenix, and San Diego.” Former Colorado Congressman Tom Tancredo reported in 2015 that between “2008 and 2014, 40% of all murder convictions in Florida were criminal aliens. In New York it was 34% and Arizona 17.8%. During those years, criminal aliens accounted for 38% of all murder convictions in the five states of California, Texas, Arizona, Florida and New York, while illegal aliens constitute only 5.6% of the total population in those states.”

Why the disconnect regarding immigrant crime estimates? There are a few issues with measuring immigrant crime, particularly illegal immigrant crime. First, statistical studies often use prison statistics, and as Frum points out, “Many of the people in prison today were sent there at a time when the foreign-born population was smaller and crime rates higher.” So if a smaller proportion of inmates are immigrants, that could reflect more on old crime rates than it does on immigrant crime rates. Second, lumping together all natives against all immigrants does a disservice to both natives and immigrants – there are sub-groups within both “natives” and “immigrants” with widely varying crime rates. Domestically born Jews, for example, have a far lower crime rate than domestically born blacks; Asian immigrants have a far lower crime rate than Mexican immigrants; Chinese immigrants have a far lower crime rate than Vietnamese immigrants. As Frum says: “Among those native-born groups with higher rates of crime: children of immigrants, who offend at rates substantially higher than their parents.”

Overall, statistics on immigrant crime are quite poorly kept. That’s because so many crime statistics depend on the Census, which undersamples illegal immigrant populations. Alex Nowrasteh of CATO Institute, an ardent advocate of open immigration, admits, “studies of immigrant criminality based on Census data alone could fail to give the full picture…the government has done a very poor job of gathering data on the nationality and immigration status of prisoners – even when it has tried.”

In his comprehensive tome The Rise and Fall of Violent Crime in America, Professor Barry Latzer sums up his findings: “assertions that immigration invariably reduces crime in the host country are not borne out by the evidence. Such contentions have no more support than the converse claim that immigrants inevitably raise crime rates.” Latzer concludes that the crime rate of the incoming community and the crime rate of the absorbing community make all the difference. In communities like Los Angeles and Miami, high levels of immigration had undoubtedly raised the crime rates.

How about illegal immigration harming the economy via increased dependency on government largesse?

Low-skill legal immigration, and illegal immigration –because illegal immigrants tend to be low-skill, low-wage workers – provide a serious drain on America’s public resources. Nearly one quarter of all immigrant households in the United States are led by a non-high school graduate, and the average immigrant household has significantly more children than the average citizen household.

While groups like Partnership for a New Economy provide friendly statistics on the economic benefits of immigration, they don’t typically investigate the cost of illegal immigration. Those costs are substantial and burdensome. The vast majority of immigrants, both legal and illegal, come to America looking for a job, but the security provided by America’s safety net doesn’t go untouched. Legal immigrants are eligible for the vast majority of welfare programs; illegal immigrants typically rely on food programs and Medicaid via their kids. That doesn’t count the cost of education, either, which has skyrocketed in areas with a significant influx of immigrants.

The anti-illegal immigration group Federation for American Immigration Reform estimates that the cost of “education, health care, law enforcement, and social and government services to illegal aliens and their dependents costs Californians $25.3 billion per year.” That includes $14.4 billion spent on K-12 education, as well as another $4.4 billion on criminal justice system costs. As of 2007, 18 percent of households in LA County were on welfare – but 41 percent of immigrant households and 48 percent of households headed by an illegal immigrant were on a welfare program.

Such costs aren’t relegated to California. According to the Center for Immigration Studies, nearly half of all households headed by legal immigrants used at least one welfare program in 2012, compared with 30 percent of native-headed households; that imbalance is particularly stark with regard to food programs (36 percent to 22 percent) and Medicaid (39 percent to 23 percent). Legalizing illegal immigrants would make those immigrants eligible for such programs, widening that imbalance. Immigrants and their children were responsible for “42 percent of the growth in Medicaid enrollment from 2011 to 2013,” largely because immigrants are disproportionately poor and uninsured. Immigrant families benefit disproportionately from expansion of Medicaid under Obamacare as well.

In terms of absolute cost, CIS estimates that the average immigrant household takes $6,234 per year in federal welfare benefits, far higher than the native-born population’s $4,431 per household. Furthermore, “The average immigrant household consumes 33 percent more cash welfare, 57 percent more food assistance, and 44 percent more Medicaid dollars than the average native household.” Not all immigrants take the same amount of welfare, of course – households led by immigrants from Central America and Mexico average $8,251 in welfare benefits.

So no, it isn’t true that there are no economic or criminal costs to illegal immigration. At the very best, the case is mixed – and if the case is mixed, that’s a problem for advocates for illegal immigration, since a country has a right to usher in only those who benefit it.