Ported prepareDataType() from old strong-remoting:ext/swagger.js