varchar nvarchar param length calculation

1. calculate and use value length

2. for nvarchar storage size is two times n bytes 
http://msdn.microsoft.com/en-us/library/ms186939.aspx

3. no need for big buffer if param value is null