Update bkoFlotr2pie.js

added few error handling