Accept string and array in unload API
Fix data type when no data - #580