Use early returns.

No functionality change.