Added special case when the value is allowed to be null (it was forcing integer/float conversion)