prevent null ref in rpubs upload