Unable to pull extra data from another table programmatically

Screens table has a column “routerIp” that has a reference to another table (SIMCards).
SIMCards table has a column “siteName” that references Screens table.

I can add a new SIMCard entity and link it to a site in the Screens table.

Instance name of Screens table: screenName
Instance name of SIMCards table: siteName

However, when creating a new browser for the Screens table, I want to be able to reference the routerIp and display it in a box.

@Subscribe("testButton")
    public void onTestButtonClick(Button.ClickEvent event) {
        Screens screens = screensesTable.getSingleSelected();
        Clients clientName = screens.getClientName();
        SIMCards simCards = screens.getRouterIp();
        System.out.println(simCards);
        dialogs.createMessageDialog().withCaption(metadataTools.getInstanceName(clientName)).withMessage(metadataTools.getInstanceName(simCards)).withContentMode(ContentMode.TEXT)
                .withCloseOnClickOutside(true).withHeight("300px").withWidth("1200px").show();
    }

However, I get an “instance is null” exception.

“instance is null” when invoking metadataTools.getInstanceName(instance) means that instance is null.

If simCards is not null then clientName is.