type change and check for nullity