Wrap attribute pattern in optional.