fix null pointer deref on plugin functions when too few args are supplied. Add arg validation to some plugins. Add tests for functions without args