invert typeof for callback

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>
update documentation

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>