Safe type casting
Add new methods to generator