I would like to state that I found a workaround which allow me not to check for the type of what i put inside the ByteTensor by just using the new torch.tensor function. I do not know if this has any performance implication though.
terminals_tensor[0] = torch.tensor(True)  # works in pytorch 0.4.0