Add guard clause for iterating