Defensive try-catch