Checking if passing object is instance of class by method
public static boolean valid(@NonNull Intent intent, String stringKey, Class<Builder> dataClass) { if (dataClass == null) { throw new IllegalArgumentException("dataClass must be set"); } if (!intent.hasExtra(stringKey)) { Log.d(TAG, "valid() called with:…