Add handling for single item vs collection