It is easy to pass in the wrong representation to `lig_mask`, we should add type checks. CC @khuddzu
It is easy to pass in the wrong representation to
lig_mask, we should add type checks. CC @khuddzu