Typecasting in assignment.
Added rtti checks to object and integer/number.