diff --git a/src/js/input.js b/src/js/input.js
index <HASH>..<HASH> 100644
--- a/src/js/input.js
+++ b/src/js/input.js
@@ -126,7 +126,7 @@ export default {
      * @return {string} element XML type
      */
     getXmlType( control ) {
-        return control.dataset.typeXml.toLowerCase() || 'string';
+        return ( control.dataset.typeXml || 'string' ).toLowerCase();
     },
     /**
      * @param {Element} control
fixed: illogical code, thanks @jnm!