Shouldn't there be a NULL check before this check?