fix bug when bam object or bai object is None