Handle setting a textfield to 0 

For MON-97 - Digit input-* displays 0 as ""
Unroll the typeof statements
Merge pull request #1350 from francoisfrisch/textfield-zero

Handle setting a textfield to 0