Correct CheckMediaType() method