Checking the given element is a valid node before initialising the plugin
The plugin would error out if the element provided is not valid node. Since this plugin relies on the root node to be provided from outside; it should really check whether the value being given is actually valid. Using loose element != undefined so it will catch both undefined and null values.
Moves the calc pie into init as it should only happen once the plugin is initialised
CS fixes
Merge pull request #4 from shahrukhomar/bugfix-null-element

Bugfix -  Adds checks for invalid node element