When setting parameters, better class check