A main line in the King's Indian Defense is this 1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6. However, black could castle instead of d6:
[FEN " "]
1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 O-O
Is this a more-or-less inconsequential move order inversion or does white need to be careful to avoid some pitfall?
Specifically, in the usual mainline I would play the Sämisch Variation (5. f3) and it does not feel quite right to play f3 there right away, but maybe it is? If not, what should one do as a Sämisch player, Be3 right away?
Or, is this 4. ... O-O an error that white can try to exploit? If so, I assume the refutation ought to be 5. e5. But is this is good idea?
I am most interested in answers geared towards Class A or B players, but will be grateful for any input.