Converts a .NET type into a DbType value