getNullValue = datatype => {
  const fieldType = getFieldType(datatype);
  if (fieldType === Array) {
    return [];
  } else if (fieldType === Boolean) {
    return false;
  } else if (fieldType === String) {
    return '';
  } else if (fieldType === Number) {
    return '';
  } else {
    // normalize to null
    return null;
  }
}
Get appropriate null value for various field types

@param {Array} datatype
Field's datatype property