Fix handling dynamic result with nullable fields

Hi,

When querying dynamic results with nullable fields, they can't be casted to nullable CLR types. I've added test showing the problem and code that fixes it.

Thank you