added check for empty list.

This can just be a helper method in `TableValuedParams` doesn't need a separate extension method class