P.S. Removing the `default` argument and returning `None` in the default case led to #2161.