macros for creating arity-checking methods and functions