safe casting in call