class ObjectTypeValidator implements BiPredicate<Object, Object> {

    @Override
    public boolean test(@NonNull Object objectOne, @NonNull Object objectTwo) {
        ObjectTypeRetriever retriever = new ObjectTypeRetriever();
        return retriever.apply(objectOne).equals(retriever.apply(objectTwo));
    }

}