fix for java.lang.NullPointerException: Cannot get property 'domainClass' on null object