Add argument validation in queue.finish()