AC: Handle undefined input in objectLength function