title: Trying to convert id prop to mongoose ObjectId
body: <p>this is my function:</p>
  <pre><code> acceptContactRequest: async (
        _: any,
        { userId }: IUserInfo,
        context: ExpressContext
      ) =&gt; {.....}
  </code></pre>
  <p>IUserInfo:</p>
  <pre><code>export interface IUserInfo {
    username: string;
    password: string;
    userId: mongoose.Schema.Types.ObjectId;
  }
  </code></pre>
  <p>this is what I am trying to do:</p>
  <pre><code>   userAuth?.pendingRequests.filter(
          (requestId) =&gt; userId !== requestId
        );
  </code></pre>
  <p>requestId output is new ObjectID(id)</p>
  <p>and userId output is only the id.</p>
  <p>I tried to convert it like this :</p>
  <pre><code> userAuth?.pendingRequests.filter(
          (requestId) =&gt; mongoose.Types.ObjectId(userId) !== requestId
        );
  
    userAuth?.pendingRequests.filter(
          (requestId) =&gt; ObjectId(userId) !== requestId
        );
    userAuth?.pendingRequests.filter(
          (requestId) =&gt; new ObjectId(userId) !== requestId
        );
  </code></pre>
  <p>but none of them is work. I always get this error:</p>
  <pre><code>ObjectId' only refers to a type, but is being used as a value here
  </code></pre>
  <p>Thank you!</p>
  <p>Edit:
  requestId is coming from here
  <a href="https://i.stack.imgur.com/nh4kC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nh4kC.png" alt="enter image description here" /></a></p>
  <p>I want to match that id with userId..</p>