There is two methods I believe available now:
Check if instance of MemoryStream, not always applicable, as there may be problems with nested modules.
Check if the object has property _has present, but it is just a hacky way.
Probably need to add a more consistent method that will be officially exposed.