getExtensionFromPath = path => {
  if (!path) return '';
  const filename = getFilenameFromPath(path);
  const index = filename.lastIndexOf('.');

  if (index > 0) {
    return filename.substring(index + 1);
  } else {
    return '';
  }
}
Returns extension from the given path or filename
@param {String} path or filename
@return {String} extension or nil