fix bart api crash

added more flexible type checking on bart api xml results