If no result in `getLastNumber`, you're returning `0` not `null`. I would go for returning `null` in the method.