Fix work with exceptions. Equals of strings are made more correct (when string is null)