MeshDataApply but only MeshData with a submesh

Is there a way to only apply the meshedata that are have a submesh, and skip setting ones that don’t have any submesh, I want the Mesh to stay the same if the MeshData being applied has no submesh?