Allow passing raw javascript objects to .add