make sure the input var are of the right type.