BugFix: check for validity of piechart object