title: Maybe "kind-of" monad in Python
body: <p>Trying to find a way to clean up some of my code.</p>
  
  <p>So, I have something like this in my Python code:</p>
  
  <pre class="lang-py prettyprint-override"><code>company = None
  country = None
  
  person = Person.find(id=12345)
  if person is not None: # found        
      company = Company.find(person.companyId)
  
      if company is not None:
           country = Country.find(company.countryId)
  
  return (person, company, country)
  </code></pre>
  
  <p>Having read a tutorial on Haskell's monads (in particular <em>Maybe</em>), I was wondering if it's possible to write it in another way.</p>