Fix dead code warning by moving null check to the correct spot

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1631018 13f79535-47bb-0310-9956-ffa450edef68
Remove dead code

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