fixed a warning for empty value for error object