added initialization check for entities DebugString function