memcg: check that kmem_cache has memcg_params before accessing it