This is not needed. ``$result[$class][] = $ent;`` will not throw any notice if the key does not exist yet as it is writing in it, not reading.