FigureFormat could not handle null. It returns JsNull now.

Fixes a crash
AbstractFormat: Make figureF implicit and use it implicitly
Merge pull request #43 from gicmo/fixFigureWrites

Fix FigureFormat writes