isError function

Tell whether an object is an error