1) cast variables to their own type; 2) print warning info if no corresponding lua callback function instead of crash;