Check for error rather than string