simplify getClass for objects that are not Hibernate proxies