Don't introduce a huge if, return early instead.

Change-Id: Id24cfcd34355ed39f80baa9e7b90ab7705e852a2