I was thinking about doing something along the lines of implementing the object so that consumers would use it as an actual string.
Of course, that means implementing a lot of forwarding code, since string is sealed. Example code:
[Serializable]
public class StringNotNull
{
readonly string _value;
public StringNotNull(string value) { if (value == null) throw new ArgumentException("StringNotNull cannot have a null reference constructor parameter"); _value = value; }
public int IndexOf(string substring) { return _value.IndexOf(substring); }
public int IndexOf(string substring, int startIndex) { return _value.IndexOf(substring, startIndex); }
public static implicit operator string(StringNotNull o) { return o._value; }
public static StringNotNull operator + (StringNotNull a, StringNotNull b) { return new StringNotNull(a._value + b._value); }
public static StringNotNull operator +(string a, StringNotNull b) { return new StringNotNull(a + b._value); }
public static StringNotNull operator +(StringNotNull a, string b) { return new StringNotNull(a._value + b); }
}