Well, an easier way to do it is to populate a dictionary based on your conditions with the parameters (key = parameter name and value = the parameter value) and simply unpack it when you call the function.
parameters = {...some default parameters...}
parameters['format'] = fmat
if fmat == 'tif':
parameters['tiff_compression'] = compression
parameters['tiff_big'] = bigTiff
if blocked:
parameters['blockw'] = blockSize
parameters['blockh'] = blockSize
chunk.exportOrthomosaic(path, **parameters):