Added isError method