code: function getId(id){
          if(_.isObject(id) && !_.isUndefined(id.id)){
              if (objectIdRegex.test(id.id)) {
                  id = id.id;
              }
              else {
                  id = null;
              }
          }
          return id;
      }
docs: Function will look at the id that has been passed to the module and
  if it is a string send it back, if it is an object with an `id` property
  then it will check to see if it is a valid mongo objectid format and then
  send it back.
  @param id
  @returns {*}