More none checking changes.

@lucasb-eyer  please check!