Use recently added getTruncateOrZeroExtend method to make the code shorter.