Make sure invitation has a code before trying to access it