add params() support to model() (as it will be required by forthcoming tracing plugin) and add a isdefined() check to avoid problems