title: sql server : handle null table type
body: <p>I am passing a null table type in sql procedure and getting error <strong>Operand type clash: varchar is incompatible with MyFilters</strong>, how can we solve it, TIA.</p>
  
  <p><strong>Proc :-</strong> </p>
  
  <pre><code>Create procedure [dbo].[Filters]
  (
  @MyFilters dbo.MyFilters READONLY,
  @UserId int=0
  )
  as
  begin   
  -- code..
  end
  </code></pre>
  
  <p><strong>Type :-</strong></p>
  
  <pre><code>CREATE TYPE [dbo].[MyFilters] AS TABLE(
  ColumnName varchar(30),
  FirstFilterType varchar(20),
  FirstFilterVal varchar(200),
  SecondFilterType varchar(20),
  SecondFilterVal varchar(200),
  MultiOperator varchar(10),
  IsMulti bit,
  ColumnType varchar(20)
  )
  </code></pre>