Verify if the RPC result is an instance of dict

The RPC client is currently assuming that all values returned from the
API are iterable. Since errors are always returned as dicts, this patch
verifies whether the returned value is an instance of dict before
checking for the existence of the _error key.

Fixes bug: #1204668

Change-Id: Ie953d7dd2d327334789d66f689a30ce5e36afba9
Merge "Verify if the RPC result is an instance of dict"