make getCanvasElementById safe, fixes #2
Merge pull request #9 from hdgarrood/safe-get-canvas-element

make getCanvasElementById safe, fixes #2