/Engine/Source/Runtime/CoreUObject/Public/Blueprint/BlueprintSupport.h
Not a particularly fast function. Mostly intended for validation in debug builds.
static bool IsInBlueprintPackage ( [UObject](API\Runtime\CoreUObject\UObject\UObject) * LoadedObj )