should this be: not isinstance(tail ... ?