I have an unrelated system which uses reflection to go through objects and puts them in a HashSet where some types from the A* Pathfinding Project cause InvalidCastExceptions when it tries to compare them to objects of different types. This could be avoided by a proper implementation of any Equals overrides.
For structs, it should start with if (!(obj is StructName)) return false; which includes a null check.
For classes, it should generally start with var casted = obj as ClassName; if (casted == null) return;