util: fix potential NPE in EntitySqlDaoWrapperInvocationHandler

Handle case when caches are disabled.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>