Revert "Remove defensive conditional"

This reverts commit dbdff64bf457cd2055f8ff6c961a654300ac302b.