First we'll examine the text of Genesis:
And Abraham drew near and said, "Will you indeed sweep away the righteous with the wicked? Perhaps there are fifty righteous within the city? ... Far be it from you ... to slay the righteous with the wicked ... [S]hall the judge of all the earth not do justice?" (Genesis 18:23-25)Now we'll jump to Dr. David Keirsey's description of the "Architect" personality type, which correlates to Myers-Briggs personality type INTP:
Architects ... show the greatest precision in thought and speech of all the types. They tend to see distinctions and inconsistencies instantaneously, and can detect contradictions no matter when or where they were made. Naturally, I'll be making the case that Abraham was an INTP. For me, the real question is: "Under what circumstances is it ok to argue with G-d?"
Let's back up a bit and see what was going on in the Bible immediately before Abraham says this.
And G-d said: "Shall I hide from Abraham what I am doing, seeing that Abraham shall surely become a great and mighty nation, and all the nations of the earth shall be blessed in him? For I have known him, to the end that he may command his children and his household after him, that they may keep the way of the L-rd, to do righteousness and justice ...We can see an orderly progression in the text:
And G-d said: "Behold, the cry of Sodom and Gomorrah is great, and their sin is exceeding grievous. I will descend now and see whether they have done altogether according to the cry of it, which is come unto me, and if not, I will know."
And the men turned from there and went toward Sodom, but Abraham stood before G-d. And Abraham drew near and said: "Will you indeed sweep away the righteous with the wicked?" (Genesis 18:17-23)
- First section. G-d explains his logic to the reader. G-d has already blessed Abraham that he will become a great nation. Abraham has already demonstrated that he wants to do righteousness and justice. G-d intentionally sets up a situation where Abraham will get a chance to see what it means to do "righteousness and justice" in practice.
- Second section. G-d speaks aloud to Abraham and the men, saying that he plans to "descend" and judge the people of Sodom and Gomorrah. 
- Third section. The other men leave, and Abraham stands alone before G-d. Abraham chooses to step forward. 
Here we have an important lesson: G-d is teaching Abraham nonverbally how to behave. G-d intentionally sets up a situation where Abraham would have a choice of whether or not to argue, but G-d doesn't make the test too hard.
In the next part of the series, we will examine Abraham's words in more depth, as well as discuss some of the errors that people commonly make in their own arguments. We will also strengthen the connection to the INTP personality type, and use this personality type to explain other incidents in Abraham's life.
 G-d also "descends" to judge the builders of the Tower of Babel. (Genesis 11:5)
 The word "to step forward" also shows up when Judah stands up to Joseph to defend Benjamin. (Genesis 44:18) Joseph is second-in-command to the Pharaoh at the time, and Judah risks his life to save his brother.