Rename checkNil to assignNil and fix it for nillable types that are not pointers