Null principal check

I have added checks to handle null principals/accounts to the places I could figure out they were used/necessary. Feel free to find more usages which needs checks for this. I also added a permission check to see if you should be allowed to comment or edit location on a queue position.