Assignment type check and conversion