Update Grid.java

added null check on bean object