Fixed allow rules for problems collections. Didn't get the userId correctly

@userId returned null, now returns the correct userId to check for access
Prevent nullpointer when deleting a problem which no user has submitted an answer to