ref #10271 add error handling and avoid NPE for unhandled name relationship types