fix type checking in NeDB adapter