fixed potential NPE when users pass a null type to cast the custom field value

git-svn-id: https://svn.apache.org/repos/asf/oltu/trunk@1524396 13f79535-47bb-0310-9956-ffa450edef68