misc.py: is_part_of(): Simplified conditionals