Catch some null pointers which may occur when casting values in XQuery.
Catch some null pointers which may occur when casting values in XQuery.

svn path=/trunk/eXist/; revision=6929

MjAbuz/exist,jessealama/exist,dizzzz/exist,wshager/exist,windauer/exist,dizzzz/exist,lcahlander/exist,MjAbuz/exist,wolfgangmm/exist,jessealama/exist,shabanovd/exist,MjAbuz/exist,joewiz/exist,ambs/exist,opax/exist,jensopetersen/exist,hungerburg/exist,zwobit/exist,ambs/exist,jensopetersen/exist,adamretter/exist,eXist-db/exist,hungerburg/exist,eXist-db/exist,lcahlander/exist,wolfgangmm/exist,wolfgangmm/exist,shabanovd/exist,wshager/exist,patczar/exist,adamretter/exist,olvidalo/exist,hungerburg/exist,windauer/exist,wolfgangmm/exist,zwobit/exist,patczar/exist,ambs/exist,ambs/exist,RemiKoutcherawy/exist,dizzzz/exist,wshager/exist,hungerburg/exist,ljo/exist,MjAbuz/exist,joewiz/exist,RemiKoutcherawy/exist,patczar/exist,olvidalo/exist,zwobit/exist,lcahlander/exist,kohsah/exist,jessealama/exist,ljo/exist,patczar/exist,ljo/exist,eXist-db/exist,opax/exist,jessealama/exist,kohsah/exist,olvidalo/exist,kohsah/exist,kohsah/exist,jensopetersen/exist,kohsah/exist,jessealama/exist,shabanovd/exist,RemiKoutcherawy/exist,zwobit/exist,joewiz/exist,RemiKoutcherawy/exist,dizzzz/exist,dizzzz/exist,ambs/exist,jensopetersen/exist,shabanovd/exist,shabanovd/exist,lcahlander/exist,adamretter/exist,adamretter/exist,patczar/exist,eXist-db/exist,ljo/exist,opax/exist,lcahlander/exist,adamretter/exist,ambs/exist,zwobit/exist,MjAbuz/exist,olvidalo/exist,hungerburg/exist,adamretter/exist,kohsah/exist,wolfgangmm/exist,jessealama/exist,patczar/exist,jensopetersen/exist,wshager/exist,ljo/exist,dizzzz/exist,RemiKoutcherawy/exist,windauer/exist,joewiz/exist,joewiz/exist,opax/exist,joewiz/exist,olvidalo/exist,jensopetersen/exist,windauer/exist,ljo/exist,RemiKoutcherawy/exist,eXist-db/exist,shabanovd/exist,wshager/exist,opax/exist,windauer/exist,wshager/exist,MjAbuz/exist,zwobit/exist,wolfgangmm/exist,lcahlander/exist,eXist-db/exist,windauer/exist