check arity of handlers