code: public static boolean sameClass(Class c, Object o) {
          if (o==null) return false;
          return o.getClass() == c;
      }
docs: Guard to check if the provided Object has the same
  class as the provided Class. This method will
  return false if the Object is null.