For starters, if things aren't working as you expect, don't try to do it all in one line of code...
It looks/sounds like you are trying to cast wml.R to javax.xml.bind.JAXBElement
That won't work, and you should expect the exception.  See 
https://github.com/plutext/docx4j/blob/ ... R.java#L70I suspect you want to know whether the R content is instrText?  At 
https://github.com/plutext/docx4j/blob/ ... java#L3364
Using java Syntax Highlighting
    /**
     * Create an instance of {@link JAXBElement }{@code <}{@link Text }{@code >}}
     * 
     */
    @XmlElementDecl
(namespace 
= "http://schemas.openxmlformats.org/wordprocessingml/2006/main", name 
= "instrText", scope 
= R.
class)
    public JAXBElement
<Text
> createRInstrText
(Text value
) {
        return new JAXBElement
<Text
>(_RInstrText_QNAME, Text.
class, R.
class, value
);
    }
 Parsed in 0.013 seconds,  using 
GeSHi 1.0.8.4
 
  Start by iterating through the content and printing out the name of the objects.  If it is a JAXBElement, cast to that and use JAXBElement's methods to see what it wraps.