Fix for https://issues.jboss.org/browse/RESTEASY-864
Check value for null before trying to convert to string