Kumail Nanjiani had a few ideas for Grinnell College's graduating class of 2017. (Photo: Grinnell College)

Immigrants may feel a little tense about what’s happening in American these days, but comedian Kumail Nanjiani has a plan to make things feel a little more relaxing for everyone.

“Have sex with an immigrant,” Nanjiani told the graduates of Grinnell College in Iowa during a commencement speech. “We’re going through a tough time right now, and it would just be really great for morale.”

Nanjiani graduated from the liberal arts school in 2001. Grinnell invited him back this week to deliver the commencement address to the graduating class of 2017. During the ceremony, the school awarded Nanjiani an honorary Doctor of Humane Letters.

Kumail Nanjiani had some interesting advice for graduates pic.twitter.com/Xfr6RM53rX — NowThis (@nowthisnews) May 24, 2017

The star of HBO’s “Silicon Valley” opened up to the graduates about his experience moving from Pakistan to Iowa for college and how it shaped the way he moved through the world.

“When I came to Grinnell I was a devout Muslim who had never romantically touched a girl and I was going to get a degree that guaranteed me a job,” Nanjiani said. “By the time I graduated I was basically a Rastafarian with a white American girlfriend and a philosophy degree. College changes you, is my point.”

He also offered advice on how to take on bigotry, even if it is uncomfortable.

“We cannot expect others to understand our point of view if we don’t understand theirs,” he said. “It’s uncomfortable and awkward and infuriating and it hurts your brain, but with that pain can come growth and real change.”

“Being a fish out of water is tough, but that’s how you evolve,” he added. “I think that’s scientifically accurate — I don’t know, I had a liberal arts education.”

Nanjiani advised the graduates to live with intention and not fear failure ― unless, he joked, you’re the person who created the exploding Samsung Galaxy phones.

Story continues

“I never thought big picture,” Nanjiani said. “That would have been overwhelming. So what I’m saying is, you can go slow. Allow your dreams and goals to change, but live an intentional life.”

He continued: “Here’s the big secret I’ve learned in the last few years: Nobody knows what they’re doing ... Everybody’s winging it out there. Some people are just better at pretending to be confident because nobody’s done ― nobody’s cooked.”

Watch Nanjiani’s full commencement speech below.

Also on HuffPost

April 2015

At an event hosted by Texas Patriots PAC: “Everything’s coming across the border: the illegals, the cars, the whole thing. It’s like a big mess. Blah. It’s like vomit.”

June 2015

At a speech announcing his campaign: "When Mexico sends its people, they’re not sending their best. They’re not sending you. They’re not sending you. They’re sending people that have lots of problems, and they’re bringing those problems with us. They’re bringing drugs. They’re bringing crime. They’re rapists. And some, I assume, are good people."

August 2015

On NBC's "Meet the Press": “We’re going to keep the families together, we have to keep the families together, but they have to go."

September 2015

On CBS's "60 Minutes": “We’re rounding ‘em up in a very humane way, in a very nice way. And they’re going to be happy because they want to be legalized. And, by the way, I know it doesn’t sound nice. But not everything is nice.”

November 2015

On MSNBC's "Morning Joe": “You are going to have a deportation force, and you are going to do it humanely."

February 2016

At a GOP primary debate: “We have at least 11 million people in this country that came in illegally. They will go out. They will come back ― some will come back, the best, through a process.”

March 2016

At a press conference when asked if he would consider allowing undocumented immigrants to stay: "We either have a country or we don’t. We either have a country or we don’t. We have borders or we don’t have borders. And at this moment, the answer is absolutely not.”

April 2016

At an event hosted by NBC's "Today Show": “They’re going to go, and we’re going to create a path where we can get them into this country legally, OK? But it has to be done legally. ... They’re going to go, and then come back and come back legally.”

July 2016

At the Republican National Convention: "Tonight, I want every American whose demands for immigration security have been denied ― and every politician who has denied them ― to listen very closely to the words I am about to say. On January 21st of 2017, the day after I take the oath of office, Americans will finally wake up in a country where the laws of the United States are enforced."

September 2016

At a rally: “Anyone who has entered the United States illegally is subject to deportation. That is what it means to have laws and to have a country. Otherwise we don’t have a country.”

September 2016

On "The Dr. Oz Show": “Well, under my plan the undocumented or, as you would say, illegal immigrant wouldn’t be in the country. They only come in the country legally.”

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.