throw exception is string is null