Defensive code on recipe template