Adds casting of JSObject to concrete type