function checkKey (k, v) {
  if (typeof k === 'number') {
    k = k.toString();
  }

  if (k[0] === '$' && !(k === '$$date' && typeof v === 'number') && !(k === '$$deleted' && v === true) && !(k === '$$indexCreated') && !(k === '$$indexRemoved')) {
    throw new Error('Field names cannot begin with the $ character');
  }

  if (k.indexOf('.') !== -1) {
    throw new Error('Field names cannot contain a .');
  }
}
Check a key, throw an error if the key is non valid
@param {String} k key
@param {Model} v value, needed to treat the Date edge case
Non-treatable edge cases here: if part of the object if of the form { $$date: number } or { $$deleted: true }
Its serialized-then-deserialized version it will transformed into a Date object
But you really need to want it to trigger such behaviour, even when warned not to use '$' at the beginning of the field names...