Fixed NULL conversion to DBNULL

When a reference was null, the corresponding SqlParameter wasn't being
sent to the stored procedure as null, causing missing parameter
exceptions.

Now any SqlParameters with a value of null have their SqlValue set to a
special DBNull value, allowing stored procedures to have default values
for null parameters.