adding callback / generator-function argument validation