Adding isError check

Change-Id: I38763ca5ba25bb067f79ef45786146c95ce3a2ed