Yes, you are right. This always works:
if (checkMediaTask2 == null || checkMediaTask2.getStatus() == Status.FINISHED) {}