how to check if something in grid is selected?

how to check if something in grid is selected?

its “grid.getSelectionModel().getFirstSelectedItem().isEmpty()”