public static function isNullOrString($value, $message = null)
    {
        if (!is_null($value) && !is_string($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or string, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
public static function isNullOrString($value, $message = null)
    {
        if (!is_null($value) && !is_string($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or string, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
public static function isNullOrString ( $ value , $ message = null ) { if ( ! is_null ( $ value ) && ! is_string ( $ value ) ) { throw new InvalidArgumentException ( sprintf ( $ message ? : 'Expected null or string, but got %s' , Helper :: typeToString ( $ value ) ) ) ; } }
Assert that the value is null or string.

@param mixed  $value
@param string $message

@return void

@throws InvalidArgumentException
Assert that the value is null or string .