Check membership's organization exists before using

This was causing the process to crash when a membership referenced an
invalid organization. To prevent that we now check for an organization
before trying to get its name.

Fixes #411