Check that es response is not a WP_Error before using as an array

Prevents fatal errors when the es query returns a `WP_Error`
Merge pull request #6 from nickdaugherty/fix-wp-error-fatal

Check that es response is not a WP_Error before using as an array