Change boolean conditional to be more concise
Change comparisons with `None` to use `is` operator