You can use xpath functions with filter mediator as modifying your synapse segment as shown below.
<filter xpath="fn:exists($body/myElement)">
<drop/>
</filter>
You can refer for Sample 156: Service Integration with specifying the receiving sequence available at [1] for further sample.
<filter xpath="fn:number(get-property('SIMPLE_SER_AMT')) > fn:number(get-property('SECURE_SER_AMT'))">
[1]. http://wso2.org/project/esb/java/4.0.3/docs/samples/proxy_samples.html
Thank You, Dharshana