Fix console error if upload.js used without datatype being defined