[mod] add is_empty function
[fix] use deepcopy just to be sure

Using copy, when copying a list you do not copy each element. With
deepcopy you do