The getPart() method in RelationshipsPart was throwing a
NullPointerException when asked for a part that doesn't exist.
Fixed by checking for null; plus added guards around logging statements.