If attribute fix. Empty dom does not give an error, input takes type text as default