add when_present for hygiene and consistency

Change-Id: I7f7db85ce3ee6a33c633aee86941d8e36d66de0e