Code cleanups

Various cleanups:

- Remove unreachable code
- Replace comparisions when dealing with None-vals