Fixed checking if a type is unmanaged or not.