Check for the cases of a null or array type param value. If array type build a string of the array values
seperated by commas.

@param value
@return String containing value.
321931
private String processSqlParams(Object value) {

        Object[] arr = null;
        if (value != null) {
            arr = TypeMappingsFactory.toObjectArray(value);
        }

        if (value == null || (arr != null && arr.length == 0)) {
            return "";
        } else if (arr != null) {
            StringBuilder result = new StringBuilder();
            for (int i = 0; i < arr.length; i++) {
                if (i > 0) {
                    result.append(',');
                    result.append(arr[i].toString());
                } else {
                    result.append(arr[i].toString());
                }
            }
            return result.toString();
        } else {
            return value.toString();
        }
    }
1181138
public boolean isValid(String value) {
    if (value == null) {
      return false;
    }
    for (int i = 0; i < patterns.length; i++) {
      if (patterns[i].matcher(value).matches()) {
        return true;
      }
    }
    return false;
  }
1354323
private static List<String> parse(String value) {
        List<String> parts = new ArrayList<String>();
        StringBuilder buffer = null; // buffer that accumulates escaped parts
        for (int length = value.length(), start = 0, comma = value.indexOf(',', 0); // split on commas
        start >= 0; // break out of the loop when no parts remain
        start = comma < 0 ? -1 : (comma + 1), comma = comma == length ? -1 : value.indexOf(',', comma + 1)) {

            String part = value.substring(start, comma < 0 ? length : comma);
            if (part.length() > 0 && part.charAt(part.length() - 1) == '\\') {
                if (buffer == null)
                    buffer = new StringBuilder();
                buffer.append(part.substring(0, part.length() - 1)).append(',');
            } else {
                parts.add(buffer == null ? part : buffer.append(part).toString());
                buffer = null;
            }
        }
        if (buffer != null)
            parts.add(buffer.toString());
        return parts;
    }
937341
public static String getExactlyValue(final String value) {
        return null == value ? null : CharMatcher.anyOf("[]`'\"").removeFrom(value);
    }
151342
public static Object getPrimitiveValueArray(Object value)
   {
      if (value == null)
         return null;

      Class<?> javaType = value.getClass();
      if (javaType.isArray())
      {
         int length = Array.getLength(value);
         Object destArr = Array.newInstance(getPrimitiveType(javaType.getComponentType()), length);
         for (int i = 0; i < length; i++)
         {
            Object srcObj = Array.get(value, i);
            Array.set(destArr, i, getPrimitiveValueArray(srcObj));
         }
         return destArr;
      }

      return value;
   }
774998
public static String safeToString(Object value) {
    try {
      // TODO(b/36844237): Re-evaluate if this is the best place for null handling (null is also
      // handled for arguments via visitNull() and this is only for literal arguments).
      return value != null ? toString(value) : "null";
    } catch (RuntimeException e) {
      return getErrorString(value, e);
    }
  }
1007825
public PactDslJsonArray includesStr(String value) {
    body.put(value);
    matchers.addRule(rootPath + appendArrayIndex(0), includesMatcher(value));
    return this;
  }
632617
function(value) {
		if (Array.isArray && Array.isArray(value)) {
			return true;
		}
		var type = Object.prototype.toString.call(value);
		if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
			return true;
		}
		return false;
	}
1095753
public void containsValue(@NullableDecl Object value) {
    check("values()").that(actual().values()).contains(value);
  }
575733
protected function parseStringsToNativeTypes($value)
    {
        if (is_array($value)) {
            return array_map([$this, 'parseStringsToNativeTypes'], $value);
        }

        if (! is_string($value)) {
            return $value;
        }

        $parsedValue = json_decode($value, true);

        if (json_last_error() === JSON_ERROR_NONE) {
            return $parsedValue;
        }

        return $value;
    }
471317
private String formatValue(String[] value) {

    String ret = "";
    for(int i=0;i<value.length;i++) {
      ret += value[i];
      if(i<value.length-1) ret+="\n";
    }
    return ret;

  }
630182
public String encryptValue(final String value) {
        try {
            return encryptValuePropagateExceptions(value);
        } catch (final Exception e) {
            LOGGER.error("Could not encrypt value [{}]", value, e);
        }
        return null;
    }
274339
@NullSafe
  public static String trim(String value) {
    return value != null ? value.trim() : null;
  }
343442
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
588630
public String[] buildWhereArgs(Object value) {
		String[] args = null;
		if (value != null) {
			args = new String[] { value.toString() };
		}
		return args;
	}
408903
@Override
    public ValidationResult validate(Object value) {
        if (value == null || value instanceof String) {
            return new ValidationResult.ValidationPassed();
        } else {
            return new ValidationResult.ValidationFailed("Value \"" + value + "\" is not a valid string!");
        }
    }
874690
private String parseValue(String fieldType, Object value) {
		if (TypeConver.isBasicType(fieldType)) {
			if (value != null) {
				return value.toString();
			} else {
				return null;
			}
		}
		return null;
	}