Bug 986678 - Fix type check in TryAddTypeBarrierForWrite. r=bhackett