Updates:
* Now, `Union` and `Optional` type hints are supported! (and their 3.10+ replacement)
The default behavior for the `Optional` type hint: try to convert the value to a specified type, if successful - use the converted value, else use `None`. Also, `None` will be used if no value is provided.
How the `Union` type hint works: in a specified order (eg `Union[float, dict, str]`) the value will be cast first to `float`, then, if the attempt fails, to `dict`, and finally to `str`. If the value cannot be converted to any of the provided types, `ValueError` will be thrown. The casting process will be stopped immediately after the first successful attempt.