Looks like we can get rid of the additional parameter of expected_type. Typer will handle type errors, here it was just for the mypy to understand incoming and outcoming type, but looks like it can handle it without it also.
error was: