Checks if a string is empty or not.
If the $value parameter is not a string, the method will always return false

@param string $value
@param bool   $isNull

@return bool true if string is empty (has 0 length); otherwise false
422943
public static function emptyString($value, $isNull = true)
    {
        if (is_string($value)) {
            return strlen($value) === 0;
        }

        return ($isNull && is_null($value)) || false;
    }
389429
public static function isEmpty($value)
    {
        if (!isset($value)) {
            return true;
        } elseif (is_bool($value)) {
            return false;
        } elseif ($value === 0) {
            return false;
        } elseif (empty($value)) {
            return true;
        } elseif (is_object($value) && method_exists($value, 'isEmpty')) {
            return $value->isEmpty();
        } elseif (static::isTraversable($value)) {
            foreach ($value as $k => $val) {
                if (!static::isEmpty($val)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
1283801
public static function IS_NUMBER($value = null)
    {
        $value = self::flattenSingleValue($value);

        if (is_string($value)) {
            return false;
        }
        return is_numeric($value);
    }
873024
public static function isStringable($value)
    {
        return static::isStringLike($value) || is_numeric($value) || is_bool($value) || is_null($value);
    }
23953
protected function validatorValue($value)
    {
        if ($value === null) {
            return $this->allowEmpty;
        }

        if (preg_match($this->pattern, $value)) {
            return true;
        }

        return false;
    }
215983
public static function isEmpty($value): bool
    {
        return (!__::isArray($value) && !__::isObject($value)) || count((array)$value) === 0;
    }
1024629
public function assertIsStringAndNonEmpty($value, $message='%s must be a string and not empty', $exception='Asserts')
    {
        if (is_string($value) === false || strlen($value) < 1) {
            $this->throwException($exception, $message, $value);
        }
    }
233555
public function isValid($value) : bool
    {
        if ($value === null && $this->nullable) {
            return true;
        }

        return is_array($value);
    }
595466
public static function isNullOrInteger($value, $message = null)
    {
        if (!is_null($value) && !is_int($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or integer, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
912223
public function isBlank($value)
    {
        // Be very sure!
        if ($value === null || strlen($value) === 0 || trim($value) === '') {
            return true;
        }

        return false;
    }
266454
public function isRequired($value)
    {
        if (is_null($value)) {
            return false;
        } elseif (is_string($value) && $value === '') {
            return false;
        } elseif ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }
303372
public function isEmpty()
    {
        return $this->isNull()
            || (is_array($this->value) && count($this->value) === 0)
            || $this->length() === 0;
    }
570328
public static function isString($value, $message = null)
    {
        if (!is_string($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected string, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
82911
protected static function parseNullOperator($value, $is_negation)
    {
        if ($value === '(null)') {
            $operator = $is_negation ? static::OPERATOR_NOT_NULL : static::OPERATOR_NULL;

            return [$operator, null];
        }

        return false;
    }
856638
public static function boolean($value, $options = null)
    {
        if (!is_null($options)) {
            $options = explode('|', $options);
        }

        if (sizeof($options) != 2) {
            $options = array('No', 'Yes');
        }

        return $options[!!$value];
    }
549433
public static function isStringCastable($value): bool
    {
        $result = false;
        $type = strtolower(gettype($value));
        switch ($type) {
            case 'string':
            case 'null':
            case 'boolean':
            case 'integer':
            case 'double':
                $result = true;
                break;
            case 'object':
                if (method_exists($value, '__toString')) {
                    $result = true;
                }
                break;
            default:
                break;
        }

        return $result;
    }
762050
public function isEmpty($value)
    {
        return empty($value) && (is_array($value) || is_object($value) || strlen(trim($value)) === 0);
    }