testing presence of BarcodeScanner object