abstracted out variadic checking