Error handling

If a WP_Error is thrown the plugin breaks without letting the user know why. This 1) prevents an error of handling an object as an array and 2) displays a WP_Error instead.