public static function isNullOrFile($value, $message = null)
    {
        if (!is_null($value) && !(is_string($value) && is_file($value))) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or file, but got %s',
                Helper::valueToString($value)
            ));
        }
    }