def can_convert(strict: bool, from_type: Type[S], to_type: Type[T]):
if (to_type is not None) and (to_type not in (all_primitive_types + all_np_primitive_types)):<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
None should be treated as a Joker here (but we know that never from_type and to_type will be None at the same time)

:param strict:
:param from_type:
:param to_type:
:return: