Added checks for method arity.