do this NULL check inside SGString not here