module Jekyll::Algolia::Utils

def self.instance_of?(input, classname)

classname - the string representation of the class
input - the variable to test

Public: Check if a variable is an instance of a specific class
def self.instance_of?(input, classname)
  input.instance_of? Object.const_get(classname)
rescue StandardError
  # The class might not even exist
  false
end