Check if failed post exists

Fixes PHP notice -

Notice: Trying to get property of non-object in /elasticpress/bin/wp-cli.php on line 431