(OFBIZ-11213) This refactoring was initiated since using UelFunction::getSize throws ClassCastException and log a consequent unneeded stack trace to test Object class type. The log is unnecessary, because it is the result of each supported class cast trial. This issue show up that lot of possible NPE were not checked against, but catched by 'Exception'. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867635 13f79535-47bb-0310-9956-ffa450edef68