add fallback to reinterpret_cast if dynamic_cast fail