Fix bad test
added parameter type checking, and corresponding tests