Calling toString() or clone() on an object should always return a string or an object. Returning null instead contravenes the method's implicit contract.

Noncompliant Code Example

public override string ToString () {
  if (this.collection.Count == 0) {
    return null; // Noncompliant
  } else {
    // ...
 {code}

Compliant Solution

public override string ToString () {
  if (this.collection.Count == 0) {
    return "";
  } else {
    // ...
 {code}

See