public static function ensureNullOrStringOrInteger($name, $value)
    {
        if (is_null($value) || is_string($value) || is_integer($value))
        {
            return;
        }

        throw new \InvalidArgumentException("'$name' must be null, a string or an integer.");
    }