Jonathan Hsu
2 min readOct 2, 2019

Ideally we’d all love to code in a perfect environment—variables always exist, data types are always correct, users never misspell or submit crazy inputs… unfortunately we exist in reality and if you don’t plan on bad data you’re going to get burned.

For this reason I’d developed a habit of making sure variables exist and that they are not null. So a simple for loop will have this type of a nesting around it:

if "skills" in user and…