guards instead of nested if
guards instead of nested if

Summary:
Replaces two nested if-blocks with guards. This is intended to help with restructuring this function in follow-ups.

@public

Reviewed By: priteshrnandgaonkar

Differential Revision: D8785659

fbshipit-source-id: 7b9d63e9814b83b999397c016ad67ad348bb0f72

facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho