def to_array_with_default(value, default_value):
        """
        Converts value into array object with specified default.
        Single values are converted into arrays with single element.

        :param value: the value to convert.

        :param default_value: default array object.

        :return: array object or default array when value is None.
        """
        result = ArrayConverter.to_nullable_array(value)
        return result if result != None else default_value
Converts value into array object with specified default.
        Single values are converted into arrays with single element.

        :param value: the value to convert.

        :param default_value: default array object.

        :return: array object or default array when value is None.