Added is_yarn method