Fix method to dynamic_cast the value here to make use this method always uses dynamic_cast.
Fix method to dynamic_cast the value here to make use this method always uses dynamic_cast.

opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core