ObjectField Get object type(Asset, Scene Object)

Hey all,
so you know how we can use “SelectionMode.Assets” or “SelectionMode.Editable” to only allow certain objects to be selectable in an Editor Script, is there a way to find out if the Object assigned to an ObjectField is an Asset or a Scene Object?

Thanks in advance!

in custom inspector: [allowSceneObjects : boolean]

anytime manual checking:

You can use EditorUtility.IsPersistent to determine whether a game object is (part of) an asset or is from the current scene.