You can remove this. It adds extra complexity without being of much benefit. The for-loop will never be entered anyway if the list is empty.