Value (@Nullable Property property, boolean useFormat) { if (property == null) return null; String value = property.getUnescapedValue(); if (value == null) return null; if (useFormat) { try { MessagePattern pattern = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_REQUIRED); pattern.parse(value); return new PropertyValue(value, pattern); } catch (IllegalArgumentException ignore) { } } return new TextValue(value); }