Added a check for the tree parameter in the init() method to  assess in the parameter is the tree or the treeview
Merge pull request #2 from byteslave/master

Parameter type check on plugin init