code: public static String[] toArray(Collection<String> stringCollection) {
          return JMOptional.getOptional(stringCollection).map(Collection::size)
                  .map(String[]::new).map(stringCollection::toArray)
                  .orElseGet(JMArrays::getEmptyStringArray);
      }
docs: To array string [ ].
  
  @param stringCollection the string collection
  @return the string [ ]