Defensive programming conversion