Hi all, I am trying to program a game which the player controls a character that shoots homing projectiles towards enemies. I have managed to implement these homing missiles but once there are no enemies left to shoot at, the program gives a NullPointerException error because it cannot find any enemies to shoot at. My idea is that some way to check if there are any of these objects are left would help get around this problem and just allow the player to shoot projectiles without any homing or no projectiles at all. Any help would be appreciated :)