function isValidFile(fileUrl, extension) {
  if (fileUrl) {
    var ext = fileUrl.split('.').pop();
    return ext === extension.replace('.', '') || ext === 'html' ? true : false;
  }
}
Checks if the file URL with file extension is a valid file to load.
@function
@param {string} fileUrl - File URL
@returns {boolean} Is valid.