/**
* Filters any field in the $fields that has it's value specified as a
* 'objectId'. It will wraps the $value, if any, into a ObjectID object.
*
* @param mixed $value Value that may be converted to ObjectID.
*
* @return ObjectID|mixed
*/
public function objectId($value = null)
{
if ($value === null) {
return new ObjectID();
}
if (is_string($value) && ObjectIdUtils::isObjectId($value)) {
$value = new ObjectID($value);
}
return $value;
}