Project.pm: tighten up is_empty check