null and correcting usage of reserved word class

this._curElement might be null when using instance mode, so we need to check this

class is reserved word http://www.w3schools.com/js/js_reserved.asp
this counts when deploying javascript in large concat'ed sources, affects IE8. surely IE8 does not support canvas in general, but that is managed later on document ready/modernizr classes. this line makes javascript to fail miserably on IE, even when encapsulating everything in try-catch block, thus NO javascript executes. had this issue with other lib already https://github.com/wout/svg.export.js/pull/4
Again: An `else if {}` is more appropriate than else `{ if {} }`!  :japanese_goblin: