fixing null check on xml collection in build script