Is this needed? I'd say it's better to just write to context every time and not worry about whether the caller has set it to '\0'.