A type system in JavaScript that saves to and reads from RethinkDB