<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cgi_parameter_str_or_none(form: cgi.FieldStorage, key: str) -> Optional[str]: """ Extracts a string parameter from a CGI form, or ``None`` if the key doesn't exist or the string is zero-length. """

    s = get_cgi_parameter_str(form, key)
    if s is None or len(s) == 0:
        return None
    return s