Fix Python 3.9 compatibility: replace PEP 604 union types with Optional daca5bd DreamsHunter commited on May 25