Hi, I need to find a document in my collection with some information about the player and if there isn’t any, insert a new one. I know in C# is FirstOrDefault(), which returns null if nothing is found. Unfortunately, in JAVA, the collection of documents cant be null. Is there some other way to do it?
Code I have so far: https://pastebin.com/mrJsgGjB