Added method to check if a block exists