if(getLength() == 0) return AtomicValue.EMPTY_VALUE.convertTo(requiredType); Item first = iterate().nextItem();
Item first = itemAt(0);
	public AtomicValue convertTo(int requiredType) throws XPathException {		if(getLength() == 0)			return AtomicValue.EMPTY_VALUE.convertTo(requiredType);		Item first = iterate().nextItem();		if(Type.subTypeOf(first.getType(), Type.ATOMIC))			return ((AtomicValue)first).convertTo(requiredType);		else			return new StringValue(first.getStringValue()).convertTo(requiredType);	}