Say you’re an attorney with a practice in trade law. You disagree with Donald Trump’s positions, but you’ve kept your opinions to yourself. Then the Trump transition team calls to offer you a job. Would you do more good staying away, or by trying to make a positive difference working for Trump?

What’s the ethical thing to do?

We posed that dilemma to Peter Singer, a Princeton University philosophy professor described by Time as one of the world’s most influential thinkers.

Take the job, Singer said in a phone interview today.

“My view is that you ought to accept the position, you ought to go into it with an open mind, you ought to go in thinking you’ll be able to make a difference,” he said. “And if you get to the point where you think there’s nothing you can do, you should be prepared to leave.”

If you do leave, and go public with your reasons, you’ll have more credibility and perhaps more influence as a critic of Trump than if you never joined the administration, Singer says.

While our scenario is hypothetical, it’s a decision some Americans may face in the coming weeks. New presidents traditionally have hired the best and brightest talent available from their parties to fill the approximately 4,000 executive branch positions that open with a change of government. But Trump’s fringe positions and alienating behavior spurred a #nevertrump movement of Republicans opposed to his presidency.

For Singer, a utilitarian who believes the consequences of an action determines its morality, there’s little to be gained from boycotting Trump if you think there’s a chance you can shape policy in a positive direction. He says the same logic should apply to working at a corporation with a poor environmental track record, like Monsanto or ExxonMobil: It’s ethical to work there if you think you can help bend the organization to do the right thing. But you must also be prepared to quit if you realize you can’t.

The calculus might be different if you have a high public profile. In that case, a decision not to join the administration would be public enough that in and of itself it could help influence policy and public opinion, Singer says. But he draws a distinction between joining a Trump White House and working with an illegitimate regime, such as Americans like Milton Friedman, who gave credibility to Augusto Pinochet after he took power in a coup d’etat in Chile.

“I’m not really sure if that is the case with Trump at this stage,” Singer said. “After all, he has been elected, and as Hillary Clinton said, and as Obama said, we have to respect this situation.”

Trump’s unique candidacy presents another reason to work for him, Singer said. Since so many of his positions are poorly defined, anyone who ends up in the administration could have more influence on Trump’s policy than you might expect.