dotnet: wrong check type