Null check related to Pull Request #100 bug fix.

We can't call val.GetType() if it's null!  This will assume that null types are not in fact custom query parameters which is what the previous behavior was.  This now passes tests (and was previously breaking).