If you feel that there should always be an object, and that there not being an object in question would mean that there is a bug in the program somewhere, then you should use First not FirstOrDefault. Doing this means that if one of your assumptions for this code ends up being violated you will be informed quickly, loudly, and as close to the source of the problem as possible.
FirstOrDefault should be used if it's entirely sensible for the query in question to have no items, resulting in a null value being returned. If you are in this position, the program should work correctly if the query does in fact return null, or whatever else you need to do for the program to function appropriately.
What you want to avoid is putting yourself in the position where a program (incorrectly) assumes a query always has at least one item, but where you use FirstOrDeafult anyway. Here you end up with NullReferenceExceptions, which can take extra debugging work to figure out where the actual problem is (a query with no items that should have had items).
FirstOrDefault()you should check for null immediately.submissionwas null, could you still do something useful?Attachand changingStateare redundant, the object returned fromDbSet<T>is tracked by change trackerNullReferenceException, you should check for null.null- so no need to check ok to let whole request to fail. (I don't thinkFirstOeDefaultis a good choice of method as I put in my answer).