<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join_paths(path1: Optional[str], path2: Optional[str]) -> Optional[str]: """ Joins two paths if neither of them is None """

    if path1 is not None and path2 is not None:
        return os.path.join(path1, path2)