Fix issue when type hint is invalid