Another way would be, again remove line 17, but replace line 16 with 'getWorld().removeObject(this);'. Then in the Background act() method add 'if (getObjects(TimeChecker.class).isEmpty()) gameOver();'.
It's important when you're writing code, to test as you go. If you think you know how you want a method, if statement, class, ect to work. You'll want to test them piece by piece, and part by part. Then put them all together.
This makes errors easier to spot and your debugging is much faster.
So you already have a gameOver() method in another class? You should have explained this at the beginning - it would have made it much easier to help you.