Don't overwrite existing mask when setting data type

If set_mask is called before setting the data type, it would be overwritten by
the data type mask (which is None in all data types other than date)

Change-Id: Id6aadaccd90c0599b3880885144a12e8d3608bc6