Replaced direct uses of System.Object.ReferenceEquals() with the reference equality operator (==) to be consistent with the rest of the codebase.