Fixed bug when returning a null value in a field of type test or varchar