Not all volumes have the 'class' identifier (for example MTP doesn't), and we can't apply indexOf on null.