Changed the behavor of AnyVal subtypes when the column is null

refs #171 

Would you check the changes of test?