Consider Rule does type checking with dynamic types, rather than static ones. Add run time time ids to all script objects. Primitives and system types do without, as boxing them is inefficient.