added PatternIsOptional test