diff --git a/src/objectid.ts b/src/objectid.ts index 3d5e22c0..8e172525 100644 --- a/src/objectid.ts +++ b/src/objectid.ts @@ -194,7 +194,7 @@ export class ObjectId extends BSONValue { * * @param otherId - ObjectId instance to compare against. */ - equals(otherId: string | ObjectId | ObjectIdLike): boolean { + equals(otherId: string | ObjectId | ObjectIdLike | undefined | null): boolean { if (otherId === undefined || otherId === null) { return false; }