Hi Aaron,
First thing I think it is good to take a look about this diagram. Based on this online documentation: (Layer types )
An ArcGISDynamicMapServiceLayer is a dynamic ArcGIS REST image service layer that allows you to work a with map service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). A dynamic map service generates images on the fly. The background color for an ArcGISDynamicMapServiceLayer will always be transparent.
An ArcGISTiledMapServiceLayer is a cached ArcGIS REST map service layer that allows you to work with a cached map service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). A cached service accesses pre-created tiles from a cache instead of dynamically rendering images.
Then, the question about how to determine whether is an ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer, I think you can first compare the REST JSON for both type of layers. Here I shared with you two different json url for each type:
ArcGISDynamicMapServiceLayer: https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson
ArcGISTiledMapServiceLayer: https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson
You can see in ArcGISDynamicMapServiceLayer the parameter "capabilities": "Data,Map,Query" versus ArcGISTiledMapServiceLayer is "capabilities": "Map"
Based on this documentation, you may try to use "GetType" method to distinguish both type of layers
Layer Class or parse the JSON to compare the capabilities. Basically, you need to compare two layer types of json and eventually find a parameter can identify the type.
Hope this can help.
Best Regards,