Replace conditional in take with guard clauses