code: 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)):
          return False
      else:
          return True
docs: 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: