Allow nil to be assigned to type attribute