Now dynamically catches InvalidCastException and throws as TypeMismatchException