Check for NULL values before believing the column type.

No matter what type the column says it is, the value could be a NULL,
so we need to check the variant type first. Otherwise we read nonsense
data.
Merge pull request #15 from andybalholm/master

Check for NULL values before believing the column type.