better error-handling on illegal parameter types