fixed a case where bind param is undef (which should be converted to NULL)