https://learn.microsoft.com/ja-jp/dotnet/api/system.dbnull.system-iconvertible-toboolean?view=net-8.0
DBNull.IConvertible.ToBoolean(IFormatProvider) Method (System) | Microsoft Learn
This conversion is not supported. Attempting to make this conversion throws an InvalidCastException.
methodsystemmicrosoftlearn