I'm writing a Chess program in Gridworld, and I'm running into a bit of a problem coming up with a line of code that checks if a location is occupied or not. Right now, I am using, but this isn't working. Any help would be greatly appreciated. Thank you!if((getGrid().isValid(l1) == true && getGrid().get(l1) != null))