Use YangInstanceIdentifier.isEmpty()