If error is nil, it should return empty string instead of \"nil\". JSON marshalling will omit empty error in such case.