Convert wait conditions into a guard clause.
Convert wait conditions into a guard clause.

Abstracted the "wait" conditional checks into a new method, thereby converting it into one guard clause.

Why? This approach improves readability of the `handleValidationErrorsStateChange()` as the intent is clear:  when true, wait by bailing out.  Then the details of the decision of whether to wait or not is handled elsewhere.

ampproject/amp-toolbox-php,ampproject/amp-toolbox-php