cast should use reflection first