Added extra check for dataType property being defined