Refactoring yaku pattern check